Executive brief
A vulnerability in the Linux kernel's F2FS file system could allow a local user to cause file system corruption. This occurs due to a synchronization issue when the system manages compressed data blocks, potentially leading to data loss or system instability after a sudden power-off or crash. Organizations using Linux systems with F2FS-formatted storage are advised to apply the latest kernel security updates.
Technical details
A race condition exists in the F2FS file system implementation within the Linux kernel. The functions reserve_compress_blocks() and release_compress_blocks() were not properly protected by the cp_rwsem lock, allowing them to race with the checkpoint process. This lack of synchronization can result in the corruption of critical filesystem metadata, including block addresses in dnodes, inode fields, and the total valid block count, particularly after a Sudden Power Off (SPO) event. An attacker with local access could potentially leverage this to cause data corruption or a denial-of-service. The issue has been resolved by ensuring these operations are covered by the appropriate semaphore locks.
Affected products
- Linux Linux Kernel 5.8 to 5.10.219, 5.11 to 5.15.161, 5.16 to 6.1.93, 6.2 to 6.6.33, 6.7 to 6.9.4
Timeline
- 2024-06-24: advisory: CVE-2024-34027 published by NVD
- 2024-05-10: patched: Initial fix committed to the Linux kernel tree
References
- https://git.kernel.org/stable/c/0a4ed2d97cb6d044196cc3e726b6699222b41019
- https://git.kernel.org/stable/c/329edb7c9e3b6ca27e6ca67ab1cdda1740fb3a2b
- https://git.kernel.org/stable/c/5d47d63883735718825ca2efc4fca6915469774f
- https://git.kernel.org/stable/c/69136304fd144144a4828c7b7b149d0f80321ba4
- https://git.kernel.org/stable/c/a6e1f7744e9b84f86a629a76024bba8468aa153b
- https://git.kernel.org/stable/c/b5bac43875aa27ec032dbbb86173baae6dce6182
- https://cert-portal.siemens.com/productcert/html/ssa-265688.html