# CVE-2024-33847: f2fs: compress: don't allow unaligned truncation on released compress inode

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **Published:** 2024-06-24T13:56:48.723Z
- **Modified:** 2026-10-15T01:17:45.260Z

## Who should check

- Anyone running Linux \>= 8e1651cd667cd6779db28314844d88b6de8312a3, \< b8962cf98595d1ec62f40f23667de830567ec8bc; \>= c61404153eb683da9c35aad133131554861ed561, \< 8acae047215024d1ac499b3c8337ef1b952f160b; \>= c61404153eb683da9c35aad133131554861ed561, \< 3ccf5210dc941a7aa0180596ac021568be4d35ec; \>= c61404153eb683da9c35aad133131554861ed561, \< 9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d; \>= c61404153eb683da9c35aad133131554861ed561, \< 5268241b41b1c5d0acca75e9b97d4fd719251c8c; \>= c61404153eb683da9c35aad133131554861ed561, \< 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee
- Anyone running Linux 5.14

## 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.

## Affected and fixed versions

- Linux: \>= 8e1651cd667cd6779db28314844d88b6de8312a3, \< b8962cf98595d1ec62f40f23667de830567ec8bc; \>= c61404153eb683da9c35aad133131554861ed561, \< 8acae047215024d1ac499b3c8337ef1b952f160b; \>= c61404153eb683da9c35aad133131554861ed561, \< 3ccf5210dc941a7aa0180596ac021568be4d35ec; \>= c61404153eb683da9c35aad133131554861ed561, \< 9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d; \>= c61404153eb683da9c35aad133131554861ed561, \< 5268241b41b1c5d0acca75e9b97d4fd719251c8c; \>= c61404153eb683da9c35aad133131554861ed561, \< 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee (cvelist)
- Linux: 5.14 (cvelist)

## Mitigation

- Upgrade Linux to 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-33847. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-33847.md
Affected: Linux >= 8e1651cd667cd6779db28314844d88b6de8312a3, < b8962cf98595d1ec62f40f23667de830567ec8bc; >= c61404153eb683da9c35aad133131554861ed561, < 8acae047215024d1ac499b3c8337ef1b952f160b; >= c61404153eb683da9c35aad133131554861ed561, < 3ccf5210dc941a7aa0180596ac021568be4d35ec; >= c61404153eb683da9c35aad…
Fixed in: Linux 8acae047215024d1ac499b3c8337ef1b952f160b, Linux 3ccf5210dc941a7aa0180596ac021568be4d35ec, Linux 9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d, Linux 5268241b41b1c5d0acca75e9b97d4fd719251c8c, Linux 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-33847 being exploited?

There is no confirmed exploitation: CVE-2024-33847 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-33847?

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-33847?

Linux \>= 8e1651cd667cd6779db28314844d88b6de8312a3, \< b8962cf98595d1ec62f40f23667de830567ec8bc; \>= c61404153eb683da9c35aad133131554861ed561, \< 8acae047215024d1ac499b3c8337ef1b952f160b; \>= c61404153eb683da9c35aad133131554861ed561, \< 3ccf5210dc941a7aa0180596ac021568be4d35ec; \>= c61404153eb683da9c35aad133131554861ed561, \< 9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d; \>= c61404153eb683da9c35aad133131554861ed561, \< 5268241b41b1c5d0acca75e9b97d4fd719251c8c; \>= c61404153eb683da9c35aad133131554861ed561, \< 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee; Linux 5.14.

### Is there a fix for CVE-2024-33847?

Yes. Fixed in Linux 8acae047215024d1ac499b3c8337ef1b952f160b, Linux 3ccf5210dc941a7aa0180596ac021568be4d35ec, Linux 9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d, Linux 5268241b41b1c5d0acca75e9b97d4fd719251c8c, Linux 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee. Upgrade Linux to 29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee or later.

### How do I check if I'm affected by CVE-2024-33847?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/b8962cf98595d1ec62f40f23667de830567ec8bc>
- patch: <https://git.kernel.org/stable/c/8acae047215024d1ac499b3c8337ef1b952f160b>
- patch: <https://git.kernel.org/stable/c/3ccf5210dc941a7aa0180596ac021568be4d35ec>
- patch: <https://git.kernel.org/stable/c/9f9341064a9b5246a32a7fe56b9f80c6f7f3c62d>
- patch: <https://git.kernel.org/stable/c/5268241b41b1c5d0acca75e9b97d4fd719251c8c>
- patch: <https://git.kernel.org/stable/c/29ed2b5dd521ce7c5d8466cd70bf0cc9d07afeee>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-33847>

HTML: <https://flawdb.com/CVE-2024-33847> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-33847>
