CVE-2024-35844

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
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

26 Sep 2025, 16:04

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
References () https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f - () https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f - Patch
References () https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc - () https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc - Patch
References () https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685 - () https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685 - Patch
References () https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a - () https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a - Patch
References () https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee - () https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee - Patch
References () https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3 - () https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3 - Patch
References () http://www.openwall.com/lists/oss-security/2024/05/30/1 - () http://www.openwall.com/lists/oss-security/2024/05/30/1 - Mailing List
References () http://www.openwall.com/lists/oss-security/2024/05/30/2 - () http://www.openwall.com/lists/oss-security/2024/05/30/2 - Mailing List
First Time Linux linux Kernel
Linux
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CWE NVD-CWE-noinfo

21 Nov 2024, 09:21

Type Values Removed Values Added
References
  • () http://www.openwall.com/lists/oss-security/2024/05/30/1 -
  • () http://www.openwall.com/lists/oss-security/2024/05/30/2 -
References () https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f - () https://git.kernel.org/stable/c/2f6d721e14b69d6e1251f69fa238b48e8374e25f -
References () https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc - () https://git.kernel.org/stable/c/569c198c9e2093fd29cc071856a4e548fda506bc -
References () https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685 - () https://git.kernel.org/stable/c/889846dfc8ee2cf31148a44bfd2faeb2faadc685 -
References () https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a - () https://git.kernel.org/stable/c/f0bf89e84c3afb79d7a3a9e4bc853ad6a3245c0a -
References () https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee - () https://git.kernel.org/stable/c/fa3ac8b1a227d9b470b87972494293348b5839ee -
References () https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3 - () https://git.kernel.org/stable/c/fc0aed88afbf6f606205129a7466eebdf528e3f3 -

05 Nov 2024, 10:16

Type Values Removed Values Added
References
  • {'url': 'http://www.openwall.com/lists/oss-security/2024/05/30/1', 'source': '416baaa9-dc9f-4396-8d5f-8c081fb06d67'}
  • {'url': 'http://www.openwall.com/lists/oss-security/2024/05/30/2', 'source': '416baaa9-dc9f-4396-8d5f-8c081fb06d67'}

10 Jun 2024, 18:15

Type Values Removed Values Added
References
  • () http://www.openwall.com/lists/oss-security/2024/05/30/1 -

10 Jun 2024, 17:16

Type Values Removed Values Added
References
  • () http://www.openwall.com/lists/oss-security/2024/05/30/2 -
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: f2fs: compress: corrige el error de conteo de reserve_cblocks cuando no hay espacio. Cuando un archivo solo necesita un direct_node, realizar las siguientes operaciones hará que el archivo no se pueda reparar: 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) copiados, 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 falló: no queda espacio en el dispositivo 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 Esto se debe a que el archivo tiene solo un nodo_directo. Después de regresar a -ENOSPC, reserve_blocks += ret no se ejecutará. Como resultado, los bloques_reservados en este momento siguen siendo 0, que no es el número real de bloques reservados. Por lo tanto, no se puede configurar fsck para reparar el archivo. Después de este parche, se configurará el indicador fsck para solucionar este problema. 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 falló: no queda espacio en el dispositivo y al reinicio del adb luego se ejecutará fsck unisoc # df -h | grep dm-48 /dev/block/dm-48 112G 112G 11M 100% /data unisoc # ./f2fs_io reserve_cblocks test.apk 924

17 May 2024, 15:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-05-17 15:15

Updated : 2025-09-26 16:04


NVD link : CVE-2024-35844

Mitre link : CVE-2024-35844

CVE.ORG link : CVE-2024-35844


JSON object : View

Products Affected

linux

  • linux_kernel