CVE-2026-139013: f2fs: force out-place update for all writes on compressed file
In the Linux kernel, the following vulnerability has been resolved:
f2fs: force out-place update for all writes on compressed file
For compressed file, compressed write may fail and fall back to raw write.
-Thread A - Thread B - f2fswritemultipages - f2fsdownwrite(&sbi->cprwsem); - f2fswritecompressedpages - ... - f2fstrylockop - ... - f2fsdownreadtrylock(&sbi->cprwsem); - ... - f2fswriterawpages - ...
Thread B acquires the lock first, which causes Thread A to fail lock acquisition and fall back to raw-data write. IPUFORCE is enabled on small-capacity storage devices (< 16GB), so f2fswriterawpages() overwrites the original compressed data in-place.
The in-memory node has been updated with raw-data addresses, while the node metadata stored on eMMC still remains in compressed state. If a power-cut occurs before the node is flushed to disk, on-disk inconsistency arises: disk data is raw, yet metadata treats it as a compressed cluster, leading to decompression failure.
To eliminate this risk completely, force out-place update for all write operations on compressed file.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Force out-of-place updates for all write operations on compressed files.