Look up another CVE · open CVE-2024-26869 in the interactive tracker
CVE-2024-26869
f2fs: fix to truncate meta inode pages forcely
Published 2024-04-17 (3 years ago) by the Linux kernel CNA. Subsystem fs/f2fs. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-26869 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.7.12-1 | Update the kernel and reboot. Fixed in 6.7.12-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.7.12-1 | Update the kernel and reboot. Fixed in 6.7.12-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.7.12-1 | Update the kernel and reboot. Fixed in 6.7.12-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
Below race case can cause data corruption: Thread A GC thread - gc_data_segment - ra_data_block - locked meta_inode page - f2fs_inplace_write_data - invalidate_mapping_pages : fail to invalidate meta_inode page due to lock failure or dirty|writeback status - f2fs_submit_page_bio : write last dirty data to old blkaddr - move_data_block - load old data from meta_inode page - f2fs_submit_page_write : write old data to new blkaddr Because invalidate_mapping_pages() will skip invalidating page which has unclear status including locked, dirty, writeback and so on, so we need to use truncate_inode_pages_range() instead of invalidate_mapping_pages() to make sure meta_inode page will be dropped.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c
include/linux/f2fs_fs.h
- What this is
- F2FS FILE SYSTEMMAINTAINERS section matched on fs/f2fs/ · linux-f2fs-devel@lists.sourceforge.net · Maintained
- Kernel module
- f2fs
Check it on the machine
grep -w CONFIG_F2FS_FS /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w f2fsPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookworm, trixie, forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64
- M
- a module where it is built at all; some flavours do not build it
- Build switch
- CONFIG_F2FS_FS
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-04-17 (3 years ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.18%, higher than 7.2% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- fs/f2fs
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 4.19 | 6.6.23 | c92f2927df86 |
| 4.19 | 6.7.11 | 77bfdb89cc22 |
| 4.19 | 6.8.2 | 04226d8e3c40 |
| 4.19 | 6.9 | 9f0c4a46be1f |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerable paths are entered through ordinary local file operations on a mounted f2fs volume — buffered overwrite with IPU, fdatasync, or O_DIRECT write — with the racing side driven by the in-kernel GC thread. No network or physical access is involved.
- AC:LAttack complexity, low
- The attacker controls the write side outright and can drive the GC side at will by fragmenting/filling the filesystem to keep background and foreground GC continuously active; the invalidation failure window is the full duration of GC's read bio, during which ra_data_block() holds the meta page locked, so the skip is the expected outcome rather than a narrow accident, and the attempt can be repeated indefinitely.
- PR:LPrivileges required, low
- Any unprivileged local user with write access to a file on an f2fs volume can reach both f2fs_inplace_write_data() and the F2FS_GET_BLOCK_DIO path; the CAP_SYS_ADMIN check on f2fs_ioc_gc() is not a barrier because the default background GC thread and f2fs_balance_fs()-triggered foreground GC provide the racing side without any privilege.
- UI:NUser interaction, none
- The attacker's own process performs the writes and the GC thread runs automatically as a kernel thread; no victim action of any kind is required.
- S:UScope, unchanged
- The corruption is confined to the f2fs filesystem and kernel managing it, with no crossing into a different security authority such as a hypervisor or IOMMU domain.
- C:HConfidentiality impact, high
- META_MAPPING is a global cache keyed by physical block address, and f2fs_invalidate_blocks() can likewise fail to evict, so a stale page can outlive the block's reallocation to a different inode — move_data_block() then copies the previous owner's on-disk content into the attacker's file, disclosing another user's data (plaintext for verity/compressed inodes).
- I:HIntegrity impact, high
- This is a direct, silent, persistent on-disk data corruption primitive: freshly written data is overwritten with stale contents, and via physical-block reuse an attacker's stale data can be written into another inode's blocks, modifying data outside the attacker's control with no error reported.
- A:HAvailability impact, high
- Corrupted blocks landing in compressed clusters or encrypted directory/dentry blocks produce decompression and directory-parse failures that raise EFSCORRUPTED, set SBI_NEED_FSCK, and trigger f2fs_handle_error() shutdown (panic under errors=panic or CONFIG_F2FS_CHECK_FS), alongside irrecoverable loss of the corrupted file data.