Skip to main content

Linux Kernel CVE-2025-40025

HIGH
2025-10-28 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
5.5 MEDIUM

Local trigger requiring mount privileges (PR:L, AV:L) with reliable BUG_ON panic; impact is a kernel crash only, so A:H and C:N/I:N rather than the CNA's default C:H/I:H.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
6.1 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Analysis Generated
Jul 30, 2026 - 07:58 vuln.today
CVE Published
Oct 28, 2025 - 10:15 cve.org
HIGH 7.8

DescriptionCVE.org

In the Linux kernel, the following vulnerability has been resolved:

f2fs: fix to do sanity check on node footer for non inode dnode

As syzbot reported below:

------------[ cut here ]------------ kernel BUG at fs/f2fs/file.c:1243! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 5354 Comm: syz.0.0 Not tainted 6.17.0-rc1-syzkaller-00211-g90d970cade8e #0 PREEMPT(full) RIP: 0010:f2fs_truncate_hole+0x69e/0x6c0 fs/f2fs/file.c:1243 Call Trace: <TASK> f2fs_punch_hole+0x2db/0x330 fs/f2fs/file.c:1306 f2fs_fallocate+0x546/0x990 fs/f2fs/file.c:2018 vfs_fallocate+0x666/0x7e0 fs/open.c:342 ksys_fallocate fs/open.c:366 [inline] __do_sys_fallocate fs/open.c:371 [inline] __se_sys_fallocate fs/open.c:369 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:369 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1e65f8ebe9

w/ a fuzzed image, f2fs may encounter panic due to it detects inconsistent truncation range in direct node in f2fs_truncate_hole().

The root cause is: a non-inode dnode may has the same footer.ino and footer.nid, so the dnode will be parsed as an inode, then ADDRS_PER_PAGE() may return wrong blkaddr count which may be 923 typically, by chance, dn.ofs_in_node is equal to 923, then count can be calculated to 0 in below statement, later it will trigger panic w/ f2fs_bug_on(, count == 0 || ...).

count = min(end_offset - dn.ofs_in_node, pg_end - pg_start);

This patch introduces a new node_type NODE_TYPE_NON_INODE, then allowing passing the new_type to sanity_check_node_footer in f2fs_get_node_folio() to detect corruption that a non-inode dnode has the same footer.ino and footer.nid.

Scripts to reproduce: mkfs.f2fs -f /dev/vdb mount /dev/vdb /mnt/f2fs touch /mnt/f2fs/foo touch /mnt/f2fs/bar dd if=/dev/zero of=/mnt/f2fs/foo bs=1M count=8 umount /mnt/f2fs inject.f2fs --node --mb i_nid --nid 4 --idx 0 --val 5 /dev/vdb mount /dev/vdb /mnt/f2fs xfs_io /mnt/f2fs/foo -c "fpunch 6984k 4k"

AnalysisAI

Local denial-of-service in the Linux kernel's F2FS filesystem allows an attacker who can mount a crafted F2FS image to trigger a kernel BUG_ON panic during a fallocate punch-hole operation. The flaw stems from missing validation of the node footer for non-inode direct nodes (dnodes), which lets a corrupted dnode be misparsed as an inode and produce an invalid truncation count. No public exploit has been identified at time of analysis and EPSS is low (0.17%, 7th percentile); reproduction requires a deliberately fuzzed on-disk image (syzbot-discovered).

Technical ContextAI

F2FS (Flash-Friendly File System) is a mainline Linux filesystem optimized for NAND flash and widely used on Android and embedded/flash-storage devices. Each F2FS node page carries a footer identifying its inode number (footer.ino) and node id (footer.nid); a node is treated as an inode when these match. The bug is a validation gap (CWE-20-class improper input validation; CWE is listed N/A in NVD): a non-inode dnode on a malicious image can be crafted so footer.ino footer.nid, causing f2fs_get_node_folio() to parse it as an inode. ADDRS_PER_PAGE() then returns the inode block-address count (typically 923); when dn.ofs_in_node happens to equal 923, the computed count in f2fs_truncate_hole() becomes 0, tripping f2fs_bug_on(count 0 ...) at fs/f2fs/file.c:1243 and panicking the kernel. The fix adds a NODE_TYPE_NON_INODE type passed into sanity_check_node_footer() to reject dnodes whose footer falsely claims inode identity.

Affected ProductsAI

The Linux kernel F2FS filesystem is affected; syzbot reproduced the panic on 6.17.0-rc1 (commit 90d970cade8e). No CPE strings were provided in the input, so exact version ranges are not enumerated in the source data, but the two stable-tree fix commits (git.kernel.org/stable/c/186098f34b8a5d65eb828f952c8cc56272c60ea0 and .../c18ecd99e0c707ef8f83cace861cbc3162f4fdf1) indicate the fix was backported to multiple stable branches. Any kernel build with F2FS support (CONFIG_F2FS_FS) prior to those fix commits should be considered vulnerable.

RemediationAI

Upstream fix available (commits 186098f34b8a5d65eb828f952c8cc56272c60ea0 and c18ecd99e0c707ef8f83cace861cbc3162f4fdf1 on git.kernel.org/stable); a released patched version is not independently confirmed from the input data, so update to the latest stable/LTS kernel from your distribution that incorporates these commits and rebuild/redeploy. As a specific compensating control where patching is delayed, prevent mounting of untrusted F2FS images: disable automount of removable media (udisks/USB auto-mount), restrict the mount capability so unprivileged users cannot mount filesystems, and blacklist the f2fs module (modprobe blacklist / do not load CONFIG_F2FS_FS) on systems that do not require it - the trade-off is loss of removable-media convenience and inability to use F2FS volumes on that host. On Android/embedded systems that rely on F2FS for internal storage, the module cannot be disabled, so kernel update is the only real remediation.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected

Share

CVE-2025-40025 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy