CVE-2026-139569: f2fs: reject device aliasing without a multi-device configuration
In the Linux kernel, the following vulnerability has been resolved:
f2fs: reject device aliasing without a multi-device configuration
A malformed F2FS image can enable F2FSFEATUREDEVICEALIAS without providing a multi-device configuration. For a regular single-device filesystem, f2fsscandevices() returns without allocating sbi->devs.
In this state, f2fsdevisallocblocked() passes the device alias feature check and dereferences FDEV(0), resulting in a NULL pointer dereference during segment allocation.
Device aliasing requires at least one secondary device. Reject superblocks that enable device aliasing without entries for both the main and secondary devices in sanitycheckrawsuper().
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the NULL pointer dereference?
An attacker needs to provide a malformed F2FS image that enables F2FS_FEATURE_DEVICE_ALIAS while omitting the required multi-device configuration. The filesystem is then treated as a regular single-device filesystem, leaving the device array unallocated before segment allocation dereferences its first entry.
Are ordinary single-device F2FS filesystems affected?
The vulnerable condition is a malformed single-device F2FS image that advertises device aliasing without entries for both the main and secondary devices. A normal single-device filesystem that does not enable the device-alias feature is not described as affected.
What validation prevents the issue after the fix?
The fix rejects superblocks that enable device aliasing unless they include entries for both the main device and at least one secondary device. This validation occurs in sanity_check_raw_super().