data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2024-44942 in the interactive tracker

CVE-2024-44942

f2fs: fix to do sanity check on F2FS_INLINE_DATA flag in inode during GC

7.8 EPSS 0.2% AV:L

Published 2024-08-26 (2 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-44942 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

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No 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 13trixiefixed6.10.6-1Update the kernel and reboot. Fixed in 6.10.6-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.10.6-1Update the kernel and reboot. Fixed in 6.10.6-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.10.6-1Update the kernel and reboot. Fixed in 6.10.6-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

syzbot reports a f2fs bug as below: ------------[ cut here ]------------ kernel BUG at fs/f2fs/inline.c:258! CPU: 1 PID: 34 Comm: kworker/u8:2 Not tainted 6.9.0-rc6-syzkaller-00012-g9e4bc4bcae01 #0 RIP: 0010:f2fs_write_inline_data+0x781/0x790 fs/f2fs/inline.c:258 Call Trace: f2fs_write_single_data_page+0xb65/0x1d60 fs/f2fs/data.c:2834 f2fs_write_cache_pages fs/f2fs/data.c:3133 [inline] __f2fs_write_data_pages fs/f2fs/data.c:3288 [inline] f2fs_write_data_pages+0x1efe/0x3a90 fs/f2fs/data.c:3315 do_writepages+0x35b/0x870 mm/page-writeback.c:2612 __writeback_single_inode+0x165/0x10b0 fs/fs-writeback.c:1650 writeback_sb_inodes+0x905/0x1260 fs/fs-writeback.c:1941 wb_writeback+0x457/0xce0 fs/fs-writeback.c:2117 wb_do_writeback fs/fs-writeback.c:2264 [inline] wb_workfn+0x410/0x1090 fs/fs-writeback.c:2304 process_one_work kernel/workqueue.c:3254 [inline] process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3335 worker_thread+0x86d/0xd70 kernel/workqueue.c:3416 kthread+0x2f2/0x390 kernel/kthread.c:388 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The root cause is: inline_data inode can be fuzzed, so that there may be valid blkaddr in its direct node, once f2fs triggers background GC to migrate the block, it will hit f2fs_bug_on() during dirty page writeback. Let's add sanity check on F2FS_INLINE_DATA flag in inode during GC, so that, it can forbid migrating inline_data inode's data block for fixing.

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/gc.c

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 f2fs

Prints 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-08-26 (2 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.22%, higher than 12.3% 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

IntroducedFixed inCommit
3.86.6.47ae00e6536a2d
3.86.10.626c07775fb5d
3.86.11fc01008c92f4

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 poisoned inode reaches `gc_data_segment()` only after a local mount of an attacker-supplied f2fs image via loop device or removable media, and the triggering GC/writeback activity is entirely local kernel work. There is no network or adjacent-network path into the f2fs garbage collector.
AC:LAttack complexity, low
Setting `F2FS_INLINE_DATA` in the inode while leaving a valid blkaddr in its direct node is a direct on-disk edit, and `is_alive()` plus the phase-4 checks then pass deterministically; background GC is enabled by default and the attacker can size the image so free sections run low, forcing migration on demand. No race, timing, or memory-layout condition outside the attacker's control is involved.
PR:LPrivileges required, low
An unprivileged local user gets the crafted image mounted through loop devices or desktop/kiosk/Android automounters (udisks2, systemd, vold), and no capability check exists on the GC or writeback path that follows. This matches how the repo scores equivalent f2fs on-disk validation bugs (CVE-2024-47690, CVE-2024-56692).
UI:NUser interaction, none
In the automount/loop scenario the attacker performs the mount itself and the background GC kthread plus the flusher worker drive the crash asynchronously. No separate victim action is required.
S:UScope, unchanged
The BUG_ON panic, the stuck page/node-page locks, and the corrupted inode block-pointer array all remain inside the kernel's own security authority and the mounted filesystem. No VM, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
On the non-`CONFIG_F2FS_CHECK_FS` path the WARN is non-fatal and the inode's `i_addr[]` array is replaced with attacker-chosen 32-bit values that f2fs subsequently dereferences as block addresses in `f2fs_get_dnode_of_data()`/`f2fs_map_blocks()`, allowing in-range blocks belonging to other files on the volume to be read back. The persisted metadata corruption therefore yields cross-file content disclosure, not merely a crash.
I:HIntegrity impact, high
`memcpy_from_page(inline_data_addr(inode, dn.inode_page), page, 0, MAX_INLINE_DATA(inode))` stomps roughly the whole `i_addr[]` block-pointer array of the inode with the contents of an unrelated data block the attacker controls, and `set_page_dirty(dn.inode_page)` writes that back to disk. The result is attacker-controlled corruption of filesystem metadata that the kernel only flags with `SBI_NEED_FSCK` rather than rejecting.
A:HAvailability impact, high
With `CONFIG_F2FS_CHECK_FS` the reported failure is an outright `kernel BUG at fs/f2fs/inline.c:258` inside the writeback kworker, which dies holding the data page lock and the locked inode node page so every subsequent access to that inode and the bdi flusher deadlocks; without it the `WARN_ON` is fatal under `panic_on_warn` and otherwise repeats on every GC pass while marking the filesystem as needing fsck.