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

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

CVE-2024-56692

f2fs: fix to do sanity check on node blkaddr in truncate_node()

7.8 EPSS 0.2% AV:L

Published 2024-12-28 (22 months 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-56692 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.12.3-1Update the kernel and reboot. Fixed in 6.12.3-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.3-1Update the kernel and reboot. Fixed in 6.12.3-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.3-1Update the kernel and reboot. Fixed in 6.12.3-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/segment.c:2534! RIP: 0010:f2fs_invalidate_blocks+0x35f/0x370 fs/f2fs/segment.c:2534 Call Trace: truncate_node+0x1ae/0x8c0 fs/f2fs/node.c:909 f2fs_remove_inode_page+0x5c2/0x870 fs/f2fs/node.c:1288 f2fs_evict_inode+0x879/0x15c0 fs/f2fs/inode.c:856 evict+0x4e8/0x9b0 fs/inode.c:723 f2fs_handle_failed_inode+0x271/0x2e0 fs/f2fs/inode.c:986 f2fs_create+0x357/0x530 fs/f2fs/namei.c:394 lookup_open fs/namei.c:3595 [inline] open_last_lookups fs/namei.c:3694 [inline] path_openat+0x1c03/0x3590 fs/namei.c:3930 do_filp_open+0x235/0x490 fs/namei.c:3960 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415 do_sys_open fs/open.c:1430 [inline] __do_sys_openat fs/open.c:1446 [inline] __se_sys_openat fs/open.c:1441 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1441 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0010:f2fs_invalidate_blocks+0x35f/0x370 fs/f2fs/segment.c:2534 The root cause is: on a fuzzed image, blkaddr in nat entry may be corrupted, then it will cause system panic when using it in f2fs_invalidate_blocks(), to avoid this, let's add sanity check on nat blkaddr in truncate_node().

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/node.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-12-28 (22 months 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.21%, higher than 11.1% 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.6427d6e7eff07f
3.86.11.11c1077078ce45
3.86.12.20a5c8b3fbf62
3.86.136babe00ccd34

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 attack requires a crafted f2fs image to be mounted on the local system and is then triggered through ordinary local filesystem syscalls (`openat`, `unlink`, `truncate`) reaching `truncate_node()`; no network protocol is involved.
AC:LAttack complexity, low
The corrupted `block_addr` is a static, fully attacker-chosen field in the on-disk NAT journal that `remove_nats_in_journal()` copies into the NAT cache verbatim, so `truncate_node()` picks it up deterministically on every node truncation — no race, no timing window, and no dependence on memory layout the attacker cannot influence.
PR:LPrivileges required, low
Once the malicious volume is mounted — automatically by udisks2 on desktops/kiosks or by vold for Android SD-card/adoptable storage, since f2fs is Android's primary filesystem — any unprivileged user with access to the mount triggers the path with a plain file create, unlink, or truncate; no capability check stands between that user and `truncate_node()`.
UI:NUser interaction, none
The attacker performs both halves of the attack: the volume is mounted automatically on media insertion by the automounter, and the trigger is the attacker's own ordinary file operation, requiring no action by any victim.
S:UScope, unchanged
The out-of-bounds accesses and the resulting corruption are confined to kernel memory of the same machine; no VM, IOMMU, or other security-authority boundary is crossed.
C:HConfidentiality impact, high
`get_seg_entry()` indexes `sit_i->sentries[]` with an unbounded `segno` derived from the attacker's 32-bit blkaddr and performs no bounds check, so `update_segment_mtime()`/`update_sit_entry()` read `struct seg_entry` fields — including the `cur_valid_map`/`ckpt_valid_map`/`discard_map` pointers — from arbitrary kernel memory far outside the array.
I:HIntegrity impact, high
The same unbounded index produces out-of-bounds writes to `se->mtime`, `se->valid_blocks`, the `dirty_sentries_bitmap` bit set by `__mark_sit_entry_dirty()`, and `get_sec_entry()->valid_blocks`, plus a bit-clear performed through `se->cur_valid_map` — a pointer that was itself read out of bounds — giving a wild-pointer write primitive suitable for control-flow hijacking.
A:HAvailability impact, high
The reported symptom is an outright kernel panic at `f2fs_bug_on(sbi, addr == NULL_ADDR)` in `f2fs_invalidate_blocks()` (`BUG_ON` under `CONFIG_F2FS_CHECK_FS`, `WARN_ON` elsewhere, fatal with `panic_on_warn`), and the out-of-bounds pointer dereferences oops the kernel independently.