Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-40025

HIGH 7.8EPSS 8%

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

Mitigation

  • No fix listed yet: follow the vendor advisory.

Who should check

  • Anyone running Linux >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < 186098f34b8a5d65eb828f952c8cc56272c60ea0; >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < c18ecd99e0c707ef8f83cace861cbc3162f4fdf1
  • Anyone running Linux 3.8

Vulnerability facts

Affected
Linux >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < 186098f34b8a5d65eb828f952c8cc56272c60ea0; >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < c18ecd99e0c707ef8f83cace861cbc3162f4fdf1; Linux 3.8
Fixed in
Linux 186098f34b8a5d65eb828f952c8cc56272c60ea0
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
EPSS
0.22% chance of exploitation in 30 days (percentile 8, 2026-11-26)
Published
Modified

Description

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"

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < 186098f34b8a5d65eb828f952c8cc56272c60ea0; >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < c18ecd99e0c707ef8f83cace861cbc3162f4fdf1—cvelist
Linux3.8—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-40025. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40025.md
Affected: Linux >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < 186098f34b8a5d65eb828f952c8cc56272c60ea0; >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < c18ecd99e0c707ef8f83cace861cbc3162f4fdf1; Linux 3.8
Fixed in: Linux 186098f34b8a5d65eb828f952c8cc56272c60ea0

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2025-40025 being exploited?

There is no confirmed exploitation: CVE-2025-40025 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2025-40025?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2025-40025?

Linux >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < 186098f34b8a5d65eb828f952c8cc56272c60ea0; >= 98e4da8ca301e062d79ae168c67e56f3c3de3ce4, < c18ecd99e0c707ef8f83cace861cbc3162f4fdf1; Linux 3.8.

Is there a fix for CVE-2025-40025?

Yes. Fixed in Linux 186098f34b8a5d65eb828f952c8cc56272c60ea0. No fix listed yet: follow the vendor advisory.

How do I check if I'm affected by CVE-2025-40025?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors