In the Linux kernel, the following vulnerability has been resolved: f2fs:
compress: fix reserve_cblocks counting error when out of space When a file
only needs one direct_node, performing the following operations will cause
the file to be unrepairable: unisoc # ./f2fs_io compress test.apk unisoc
#df -h | grep dm-48 /dev/block/dm-48 112G 112G 1.2M 100% /data unisoc #
./f2fs_io release_cblocks test.apk 924 unisoc # df -h | grep dm-48
/dev/block/dm-48 112G 112G 4.8M 100% /data unisoc # dd if=/dev/random
of=file4 bs=1M count=3 3145728 bytes (3.0 M) copied, 0.025 s, 120 M/s
unisoc # df -h | grep dm-48 /dev/block/dm-48 112G 112G 1.8M 100% /data
unisoc # ./f2fs_io reserve_cblocks test.apk
F2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device adb reboot
unisoc # df -h | grep dm-48 /dev/block/dm-48 112G 112G 11M 100% /data
unisoc # ./f2fs_io reserve_cblocks test.apk 0 This is because the file has
only one direct_node. After returning to -ENOSPC, reserved_blocks += ret
will not be executed. As a result, the reserved_blocks at this time is
still 0, which is not the real number of reserved blocks. Therefore, fsck
cannot be set to repair the file. After this patch, the fsck flag will be
set to fix this problem. unisoc # df -h | grep dm-48 /dev/block/dm-48 112G
112G 1.8M 100% /data unisoc # ./f2fs_io reserve_cblocks test.apk
F2FS_IOC_RESERVE_COMPRESS_BLOCKS failed: No space left on device adb reboot
then fsck will be executed unisoc # df -h | grep dm-48 /dev/block/dm-48
112G 112G 11M 100% /data unisoc # ./f2fs_io reserve_cblocks test.apk 924
OS | Version | Architecture | Package | Version | Filename |
---|---|---|---|---|---|
ubuntu | 22.04 | noarch | linux | < 5.15.0-112.122 | UNKNOWN |
ubuntu | 24.04 | noarch | linux | < 6.8.0-35.35 | UNKNOWN |
ubuntu | 22.04 | noarch | linux-aws | < 5.15.0-1063.69 | UNKNOWN |
ubuntu | 24.04 | noarch | linux-aws | < 6.8.0-1009.9 | UNKNOWN |
ubuntu | 20.04 | noarch | linux-aws-5.15 | < 5.15.0-1063.69~20.04.1 | UNKNOWN |
ubuntu | 22.04 | noarch | linux-aws-6.5 | < any | UNKNOWN |
ubuntu | 22.04 | noarch | linux-azure | < 5.15.0-1066.75 | UNKNOWN |
ubuntu | 24.04 | noarch | linux-azure | < 6.8.0-1008.8 | UNKNOWN |
ubuntu | 20.04 | noarch | linux-azure-5.15 | < any | UNKNOWN |
ubuntu | 22.04 | noarch | linux-azure-6.5 | < any | UNKNOWN |
git.kernel.org/linus/2f6d721e14b69d6e1251f69fa238b48e8374e25f (6.9-rc1)
git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f
git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc
git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685
git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a
git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee
git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3
launchpad.net/bugs/cve/CVE-2024-35844
nvd.nist.gov/vuln/detail/CVE-2024-35844
security-tracker.debian.org/tracker/CVE-2024-35844
ubuntu.com/security/notices/USN-6816-1
ubuntu.com/security/notices/USN-6817-1
ubuntu.com/security/notices/USN-6817-2
ubuntu.com/security/notices/USN-6817-3
ubuntu.com/security/notices/USN-6820-1
ubuntu.com/security/notices/USN-6820-2
ubuntu.com/security/notices/USN-6821-1
ubuntu.com/security/notices/USN-6821-2
ubuntu.com/security/notices/USN-6821-3
ubuntu.com/security/notices/USN-6821-4
ubuntu.com/security/notices/USN-6828-1
ubuntu.com/security/notices/USN-6871-1
ubuntu.com/security/notices/USN-6878-1
ubuntu.com/security/notices/USN-6892-1
ubuntu.com/security/notices/USN-6919-1
www.cve.org/CVERecord?id=CVE-2024-35844