{"id":"CVE-2024-33847","aliases":["CVE-2024-33847"],"related":[],"kind":"vulnerability","state":"published","title":"f2fs: compress: don't allow unaligned truncation on released compress inode","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: compress: don't allow unaligned truncation on released compress inode\n\nf2fs image may be corrupted after below testcase:\n- mkfs.f2fs -O extra_attr,compression -f /dev/vdb\n- mount /dev/vdb /mnt/f2fs\n- touch /mnt/f2fs/file\n- f2fs_io setflags compression /mnt/f2fs/file\n- dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=4\n- f2fs_io release_cblocks /mnt/f2fs/file\n- truncate -s 8192 /mnt/f2fs/file\n- umount /mnt/f2fs\n- fsck.f2fs /dev/vdb\n\n[ASSERT] (fsck_chk_inode_blk:1256)  --> ino: 0x5 has i_blocks: 0x00000002, but has 0x3 blocks\n[FSCK] valid_block_count matching with CP             [Fail] [0x4, 0x5]\n[FSCK] other corrupted bugs                           [Fail]\n\nThe reason is: partial truncation assume compressed inode has reserved\nblocks, after partial truncation, valid block count may change w/o\n.i_blocks and .total_valid_block_count update, result in corruption.\n\nThis patch only allow cluster size aligned truncation on released\ncompress inode for fixing.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: compress: don't allow unaligned truncation on released compress inode\n\nf2fs image may be corrupted after below testcase:\n- mkfs.f2fs -O extra_attr,compression -f /dev/vdb\n- mount /dev/vdb /mnt/f2fs\n- touch /mnt/f2fs/file\n- f2fs_io setflags compression /mnt/f2fs/file\n- dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=4\n- f2fs_io release_cblocks /mnt/f2fs/file\n- truncate -s 8192 /mnt/f2fs/file\n- umount /mnt/f2fs\n- fsck.f2fs /dev/vdb\n\n[ASSERT] (fsck_chk_inode_blk:1256)  --> ino: 0x5 has i_blocks: 0x00000002, but has 0x3 blocks\n[FSCK] valid_block_count matching with CP             [Fail] [0x4, 0x5]\n[FSCK] other corrupted bugs                           [Fail]\n\nThe reason is: partial truncation assume compressed inode has reserved\nblocks, after partial truncation, valid block count may change w/o\n.i_blocks and .total_valid_block_count update, result in corruption.\n\nThis patch only allow cluster size aligned truncation on released\ncompress inode for fixing.","source":"cvelist"},{"lang":"es","text":"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) --&gt; 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.","source":"nvd"}],"published":"2024-06-24T13:56:48.723Z","modified":"2026-10-15T01:17:45.260Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","score":7.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"8e1651cd667cd6779db28314844d88b6de8312a3","fixed":"b8962cf98595d1ec62f40f23667de830567ec8bc","status":"affected"},{"type":"git","introduced":"c61404153eb683da9c35aad133131554861ed561","fixed":"8acae047215024d1ac499b3c8337ef1b952f160b","status":"affected"},{"type":"git","introduced":"c61404153eb683da9c35aad133131554861ed561","fixed":"3ccf5210dc941a7aa0180596ac021568be4d35ec","status":"affected"},{"type":"git","introduced":"c61404153eb683da9c35aad133131554861ed561","fixed":"9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d","status":"affected"},{"type":"git","introduced":"c61404153eb683da9c35aad133131554861ed561","fixed":"5268241b41b1c5d0acca75e9b97d4fd719251c8c","status":"affected"},{"type":"git","introduced":"c61404153eb683da9c35aad133131554861ed561","fixed":"29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.14","status":"unaffected"},{"type":"semver","introduced":"5.15.161","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.93","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.33","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.9.4","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.14","fixed":"5.15.161"},{"status":"affected","introduced":"5.16","fixed":"6.1.93"},{"status":"affected","introduced":"6.2","fixed":"6.6.33"},{"status":"affected","introduced":"6.7","fixed":"6.9.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/b8962cf98595d1ec62f40f23667de830567ec8bc","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8acae047215024d1ac499b3c8337ef1b952f160b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3ccf5210dc941a7aa0180596ac021568be4d35ec","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5268241b41b1c5d0acca75e9b97d4fd719251c8c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-265688.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-25T13:51:44.928Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-33847","url":"https://www.cve.org/CVERecord?id=CVE-2024-33847","licence":"CVE Terms of Use","modified":"2026-10-15T00:40:43.234Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-33847","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-33847","licence":"Public domain","modified":"2026-10-15T01:17:45.260Z"}],"updatedAt":"2026-11-25T22:58:42.162Z","epss":{"score":0.00226,"percentile":0.14144,"date":"2026-12-01T12:00:22.000Z"}}