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

Published Jun 24, 2024
·
Updated

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 extraattr,compression -f /dev/vdb - mount /dev/vdb /mnt/f2fs - touch /mnt/f2fs/file - f2fsio setflags compression /mnt/f2fs/file - dd if=/dev/zero of=/mnt/f2fs/file bs=4k count=4 - f2fsio releasecblocks /mnt/f2fs/file - truncate -s 8192 /mnt/f2fs/file - umount /mnt/f2fs - fsck.f2fs /dev/vdb

[ASSERT] (fsckchkinodeblk:1256) --> ino: 0x5 has iblocks: 0x00000002, but has 0x3 blocks [FSCK] validblockcount 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 .iblocks and .totalvalidblockcount update, result in corruption.

This patch only allow cluster size aligned truncation on released compress inode for fixing.

Affected Software

5 affected componentsFixes available
debian/linux
5.10.223-15.10.234-16.1.129-16.1.133-16.12.21-16.12.22-1
Linux Linux kernel>=5.14<5.15.161
Linux Linux kernel>=5.16<6.1.93
Linux Linux kernel>=6.2<6.6.33
Linux Linux kernel>=6.7<6.9.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.133-1Fixed in 6.12.21-1Fixed in 6.12.22-1
  2. Configuration

    Apply the kernel fix for f2fs compression so truncation on a released compressed inode is only permitted when the truncation size is aligned to the filesystem cluster size (prevents corruption observed as fsck ASSERT: fsck_chk_inode_blk:1256 valid_block_count/i_blocks mismatch).

    Linux kernel f2fs (compression feature) truncate behavior on released compressed inodes = Allow only cluster-size aligned truncation

Event History

Jun 24, 2024
CVE Published
via MITRE·01:56 PM
Data Sourced
via MITRE·01:56 PM
DescriptionSeverity
Data Sourced
via NVD·02:15 PM
Description
Data Sourced
via NVD·02:15 PM
RemedySeverityAffected Software
Sep 11, 2024
Data Sourced
via Launchpad·04:24 PM
Description
Apr 11, 2025
Data Sourced
via Ubuntu·05:10 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-33847?

CVE-2024-33847 is categorized with a moderate severity due to potential data corruption risks in the f2fs filesystem.

2

How do I fix CVE-2024-33847?

To fix CVE-2024-33847, you should upgrade to the patched versions of the Linux kernel: 5.10.223-1, 5.10.234-1, 6.1.123-1, 6.1.128-1, or 6.12.17-1.

3

What impact does CVE-2024-33847 have on my system?

CVE-2024-33847 can lead to data corruption on f2fs images when unaligned truncation occurs on released compressed inodes.

4

Which systems are affected by CVE-2024-33847?

CVE-2024-33847 affects Linux systems that utilize the f2fs filesystem with compression enabled.

5

Is there a workaround for CVE-2024-33847?

Currently, the recommended action for CVE-2024-33847 is to apply the necessary kernel updates rather than seeking workarounds.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203