# CVE-2024-35844: linux: In the Linux kernel, the following vulnerability has been resolved:  f2fs: compress: fix reserve_cblocks counting err...

CVE-2024-35844 is fixed in linux on 1 platform, first by DEBIAN-CVE-2024-35844, released May 17, 2024. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2024-35844
- Priority: Routine
- CVSS: 5.5 (medium)
- EPSS: 0.0024
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 17, 2024

## Description

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

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | linux Debian 12.15 (bookworm) | 6.1.85-1 | [DEBIAN-CVE-2024-35844](https://patchblox.com/security/data/fix/linux/debian-cve-2024-35844.md) | May 17, 2024 |
| Linux | linux Debian 13.5 (trixie) | 6.7.12-1 | [DEBIAN-CVE-2024-35844](https://patchblox.com/security/data/fix/linux/debian-cve-2024-35844.md) | May 17, 2024 |
| Linux | linux Debian 14 | 6.7.12-1 | [DEBIAN-CVE-2024-35844](https://patchblox.com/security/data/fix/linux/debian-cve-2024-35844.md) | May 17, 2024 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
