cve.bz

CVE-2025-40025 linux linux

7.8 highEPSS 0.1%Fix available

High (7.8) in linux linux. EPSS 0.1% estimated probability of exploitation activity in the next 30 days.

On this page
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"

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.1% (unchanged from 0.1% a week ago; 0.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 4th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-40025 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-40025?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-40025?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-40025 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux3.8 and later

Fixed in

ProductRelease lineFixed in
Linux6.176.17.2
Linuxlater releases6.18

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13linuxno fix listedDEBIAN-CVE-2025-40025
Debian14linux6.17.6-1DEBIAN-CVE-2025-40025
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-40025
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-40025
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-40025
Ubuntu22.04:LTSlinux, linux-aws, linux-gcp and 57 moreno fix listedUBUNTU-CVE-2025-40025
Ubuntu24.04:LTSlinux, linux-aws, linux-gcp and 33 moreno fix listedUBUNTU-CVE-2025-40025
Ubuntu24.04:LTSlinux-nvidia-tegra6.8.0-1035.38UBUNTU-CVE-2025-40025 USN-8781-1
Ubuntu24.04:LTSlinux-oem-6.176.17.0-1006.6UBUNTU-CVE-2025-40025
Ubuntu25.10linux6.17.0-7.7UBUNTU-CVE-2025-40025 USN-7906-1
Ubuntu25.10linux-aws, linux-gcp6.17.0-1004.4UBUNTU-CVE-2025-40025 USN-7906-1 USN-7906-2
Ubuntu25.10linux-azure6.17.0-1006.6UBUNTU-CVE-2025-40025
Ubuntu25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-40025
Ubuntu25.10linux-raspi, linux-oracle6.17.0-1005.5UBUNTU-CVE-2025-40025 USN-7906-3
11 more for Ubuntu in the JSON and on Ubuntu's page.
openSUSETumbleweedkernel-source6.17.7-1.1openSUSE-SU-2025:15702-1
openSUSETumbleweedkernel-source-longterm6.18.16-1.1openSUSE-SU-2026:10301-1
Alpaquita23, 25linux-ltsno fix listedBELL-CVE-2025-40025
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-40025

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Low.

Red Hat's statement

This vulnerability does not affect Red Hat Enterprise Linux as the F2FS file system driver is not enabled or distributed in supported kernel builds. In environments where F2FS is active, local users could exploit this flaw by mounting a manipulated file system image, causing a denial of service through a kernel panic during truncation operations. Because mounting arbitrary file systems generally requires administrative privileges or physical device access, practical exploitation is restricted to specialized deployment models.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-40025.

References

Check your stackJSON