CVE-2024-33847

In the Linux kernel, the following vulnerability has been resolved: f2fs: compress: don't allow unaligned truncation on released compress inode f2fs image may be corrupted after below testcase: - mkfs.f2fs -O extra_attr,compression -f /dev/vdb - mount /dev/vdb /mnt/f2fs - touch /mnt/f2fs/file - f2fs_io setflags compression /mnt/f2fs/file - dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=4 - f2fs_io release_cblocks /mnt/f2fs/file - truncate -s 8192 /mnt/f2fs/file - umount /mnt/f2fs - fsck.f2fs /dev/vdb [ASSERT] (fsck_chk_inode_blk:1256) --> ino: 0x5 has i_blocks: 0x00000002, but has 0x3 blocks [FSCK] valid_block_count matching with CP [Fail] [0x4, 0x5] [FSCK] other corrupted bugs [Fail] The reason is: partial truncation assume compressed inode has reserved blocks, after partial truncation, valid block count may change w/o .i_blocks and .total_valid_block_count update, result in corruption. This patch only allow cluster size aligned truncation on released compress inode for fixing.
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:*:*:*:*:*:*:*:*

History

01 Oct 2025, 13:56

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CWE NVD-CWE-noinfo
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
First Time Linux linux Kernel
Linux
References () https://git.kernel.org/stable/c/29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee - () https://git.kernel.org/stable/c/29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee - Patch
References () https://git.kernel.org/stable/c/3ccf5210dc941a7aa0180596ac021568be4d35ec - () https://git.kernel.org/stable/c/3ccf5210dc941a7aa0180596ac021568be4d35ec - Patch
References () https://git.kernel.org/stable/c/5268241b41b1c5d0acca75e9b97d4fd719251c8c - () https://git.kernel.org/stable/c/5268241b41b1c5d0acca75e9b97d4fd719251c8c - Patch
References () https://git.kernel.org/stable/c/8acae047215024d1ac499b3c8337ef1b952f160b - () https://git.kernel.org/stable/c/8acae047215024d1ac499b3c8337ef1b952f160b - Patch
References () https://git.kernel.org/stable/c/9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d - () https://git.kernel.org/stable/c/9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d - Patch
References () https://git.kernel.org/stable/c/b8962cf98595d1ec62f40f23667de830567ec8bc - () https://git.kernel.org/stable/c/b8962cf98595d1ec62f40f23667de830567ec8bc - Patch

21 Nov 2024, 09:17

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: f2fs: comprimir: no permitir el truncamiento no alineado en el inodo comprimido liberado. La imagen f2fs puede estar dañada después del siguiente caso de prueba: - mkfs.f2fs -O extra_attr,compression -f /dev/vdb - montar /dev/vdb /mnt/f2fs - tocar /mnt/f2fs/file - f2fs_io setflags compresión /mnt/f2fs/file - dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=4 - f2fs_io release_cblocks /mnt/f2fs/file - truncate -s 8192 /mnt/f2fs/file - umount /mnt/f2fs - fsck.f2fs /dev/vdb [ASSERT] (fsck_chk_inode_blk:1256) --> ino: 0x5 tiene i_blocks : 0x00000002, pero tiene bloques 0x3 [FSCK] valid_block_count que coincide con CP [Falla] [0x4, 0x5] [FSCK] otros errores corruptos [Falla] La razón es: truncamiento parcial se supone que el inodo comprimido tiene bloques reservados, después del truncamiento parcial, bloque válido El recuento puede cambiar sin la actualización de .i_blocks y .total_valid_block_count, lo que provoca corrupción. Este parche solo permite el truncamiento alineado con el tamaño del clúster en el inodo comprimido liberado para su reparación.
References () https://git.kernel.org/stable/c/29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee - () https://git.kernel.org/stable/c/29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee -
References () https://git.kernel.org/stable/c/3ccf5210dc941a7aa0180596ac021568be4d35ec - () https://git.kernel.org/stable/c/3ccf5210dc941a7aa0180596ac021568be4d35ec -
References () https://git.kernel.org/stable/c/5268241b41b1c5d0acca75e9b97d4fd719251c8c - () https://git.kernel.org/stable/c/5268241b41b1c5d0acca75e9b97d4fd719251c8c -
References () https://git.kernel.org/stable/c/8acae047215024d1ac499b3c8337ef1b952f160b - () https://git.kernel.org/stable/c/8acae047215024d1ac499b3c8337ef1b952f160b -
References () https://git.kernel.org/stable/c/9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d - () https://git.kernel.org/stable/c/9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d -
References () https://git.kernel.org/stable/c/b8962cf98595d1ec62f40f23667de830567ec8bc - () https://git.kernel.org/stable/c/b8962cf98595d1ec62f40f23667de830567ec8bc -

24 Jun 2024, 14:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-06-24 14:15

Updated : 2025-10-01 13:56


NVD link : CVE-2024-33847

Mitre link : CVE-2024-33847

CVE.ORG link : CVE-2024-33847


JSON object : View

Products Affected

linux

  • linux_kernel