CVE-2024-33847

f2fs: compress: don't allow unaligned truncation on released compress inode

7.1 high EPSS 0.23%

Published 24 Jun 2024 Updated 15 Oct 2026 CNA: Linux

Check your servers for CVE-2024-33847

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-33847 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Severity (CVSS)

7.1 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality none, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.23%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.1% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 25 Jun 2024):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 8e1651cd667cd6779db28314844d88b6de8312a3, before b8962cf98595d1ec62f40f23667de830567ec8bc
affected from c61404153eb683da9c35aad133131554861ed561, before 8acae047215024d1ac499b3c8337ef1b952f160b
affected from c61404153eb683da9c35aad133131554861ed561, before 3ccf5210dc941a7aa0180596ac021568be4d35ec
affected from c61404153eb683da9c35aad133131554861ed561, before 9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d
affected from c61404153eb683da9c35aad133131554861ed561, before 5268241b41b1c5d0acca75e9b97d4fd719251c8c
affected from c61404153eb683da9c35aad133131554861ed561, before 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee
Other versions: unaffected
Linux
affected 5.14
unaffected before 5.14
unaffected from 5.15.161 up to and including 5.15.*
unaffected from 6.1.93 up to and including 6.1.*
unaffected from 6.6.33 up to and including 6.6.*
unaffected from 6.9.4 up to and including 6.9.*
unaffected 6.10 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-33847 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-33847

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-33847
trivy image --scanners vuln IMAGE | grep CVE-2024-33847

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-33847 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.