CVE-2025-40025
published high CVSS 3.1 · 7.8f2fs: fix to do sanity check on node footer for non inode dnode
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux98e4da8ca301e062d79ae168c67e56f3c3de3ce4 to < 186098f34b8a5d65eb828f952c8cc56272c60ea0 · 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 to < c18ecd99e0c707ef8f83cace861cbc3162f4fdf1 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux3.8 (affected) · 0 to < 3.8 (unaffected · semver) · 6.17.2 through 6.17.* (unaffected · semver) · 6.18 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| Ubuntu | noble | linux-buildinfo-6.8.0-1035-nvidia-tegra | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devels390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
Show 96 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-develx86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermaarch64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermppc64le | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longterms390x | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-devel-longtermx86_64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macross390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-macrosx86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourceaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourceppc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sources390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-sourcex86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermaarch64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermppc64le | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longterms390x | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-longtermx86_64 | Advisory build | 6.18.16-1.1 | OPENSUSE-SU-2026:10301-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillaaarch64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillappc64le | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillas390x | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | kernel-source-vanillax86_64 | Advisory build | 6.17.7-1.1 | OPENSUSE-SU-2025:15702-1 |
| Ubuntu | noble | linux-buildinfo-6.8.0-1035-nvidia-tegra-rt | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-headers-6.8.0-1035-nvidia-tegra | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-headers-6.8.0-1035-nvidia-tegra-rt | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-image-unsigned-6.8.0-1035-nvidia-tegra | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-image-unsigned-6.8.0-1035-nvidia-tegra-rt | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-modules-6.8.0-1035-nvidia-tegra | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-modules-6.8.0-1035-nvidia-tegra-rt | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-modules-extra-6.8.0-1035-nvidia-tegra | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-modules-extra-6.8.0-1035-nvidia-tegra-rt | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-nvidia-tegra | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-nvidia-tegra-headers-6.8.0-1035 | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-nvidia-tegra-tools-6.8.0-1035 | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-tools-6.8.0-1035-nvidia-tegra | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | noble | linux-tools-6.8.0-1035-nvidia-tegra-rt | Advisory build | 6.8.0-1035.38 | USN-8781-1 |
| Ubuntu | questing | bpftool | Advisory build | 7.7.0+6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-aws | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-aws-cloud-tools-6.17.0-1004 | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-aws-headers-6.17.0-1004 | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-aws-tools-6.17.0-1004 | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1003-realtime | Advisory build | 6.17.0-1003.4 | USN-7906-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1004-aws | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1004-aws-64k | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1004-gcp | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1004-gcp-64k | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-buildinfo-6.17.0-1005-raspi | Advisory build | 6.17.0-1005.5 | USN-7906-3 |
| Ubuntu | questing | linux-buildinfo-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-buildinfo-6.17.0-7-generic-64k | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-1003-realtime | Advisory build | 6.17.0-1003.4 | USN-7906-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-1004-aws | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-1004-aws-64k | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-7 | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-cloud-tools-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-cloud-tools-common | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-gcp | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-gcp-headers-6.17.0-1004 | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-gcp-tools-6.17.0-1004 | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-headers-6.17.0-1003-realtime | Advisory build | 6.17.0-1003.4 | USN-7906-1 |
| Ubuntu | questing | linux-headers-6.17.0-1004-aws | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-headers-6.17.0-1004-aws-64k | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-headers-6.17.0-1004-gcp | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-headers-6.17.0-1004-gcp-64k | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-headers-6.17.0-1005-raspi | Advisory build | 6.17.0-1005.5 | USN-7906-3 |
| Ubuntu | questing | linux-headers-6.17.0-7 | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-headers-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-headers-6.17.0-7-generic-64k | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-image-6.17.0-1005-raspi | Advisory build | 6.17.0-1005.5 | USN-7906-3 |
| Ubuntu | questing | linux-image-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1003-realtime | Advisory build | 6.17.0-1003.4 | USN-7906-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1004-aws | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1004-aws-64k | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1004-gcp | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-1004-gcp-64k | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-image-unsigned-6.17.0-7-generic-64k | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-lib-rust-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-modules-6.17.0-1003-realtime | Advisory build | 6.17.0-1003.4 | USN-7906-1 |
| Ubuntu | questing | linux-modules-6.17.0-1004-aws | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-modules-6.17.0-1004-aws-64k | Advisory build | 6.17.0-1004.4 | USN-7906-1 |
| Ubuntu | questing | linux-modules-6.17.0-1004-gcp | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-modules-6.17.0-1004-gcp-64k | Advisory build | 6.17.0-1004.4 | USN-7906-2 |
| Ubuntu | questing | linux-modules-6.17.0-1005-raspi | Advisory build | 6.17.0-1005.5 | USN-7906-3 |
| Ubuntu | questing | linux-modules-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-modules-6.17.0-7-generic-64k | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-modules-ipu6-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-modules-ipu7-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-modules-iwlwifi-6.17.0-1003-realtime | Advisory build | 6.17.0-1003.4 | USN-7906-1 |
| Ubuntu | questing | linux-modules-iwlwifi-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-modules-usbio-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-modules-vision-6.17.0-7-generic | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-perf | Advisory build | 6.17.0-7.7 | USN-7906-1 |
| Ubuntu | questing | linux-raspi | Advisory build | 6.17.0-1005.5 | USN-7906-3 |
| Ubuntu | questing | linux-raspi-headers-6.17.0-1005 | Advisory build | 6.17.0-1005.5 | USN-7906-3 |
| Ubuntu | questing | linux-raspi-tools-6.17.0-1005 | Advisory build | 6.17.0-1005.5 | USN-7906-3 |
| Ubuntu | questing | linux-realtime | Advisory build | 6.17.0-1003.4 | USN-7906-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
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"
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerability is reached through local syscalls (fallocate/read/write/truncate) on a file residing in a mounted, attacker-crafted f2fs image; no network or remote protocol handling is involved. AC:L - The attacker fully controls the on-disk node footer (footer.ino == footer.nid) and the punch-hole offset/length, so the misparse and the resulting out-of-bounds access are deterministic — the commit ships a byte-exact reproducer via inject.f2fs plus a single xfs_io fpunch. PR:L - Once the crafted image is mounted (removable media/automount, shared workstation, or Android SD card), triggering requires only an unprivileged local user issuing a normal fallocate or read on a file in that filesystem — no capability check exists on the path from vfs_fallocate to f2fs_get_dnode_of_data. UI:N - After the malicious image is present, the attacker performs every step themselves; no victim action is needed to reach f2fs_truncate_hole or the read/write paths that hit the same misparse. S:U - The corruption is confined to kernel memory within the same security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - f2fs_data_blkaddr() indexes i_addr (base byte 360) with a direct-node offset up to 1017, reading past the end of the 4 KiB node folio; the leaked adjacent kernel memory becomes dn->data_blkaddr, which f2fs then treats as a physical block address and may read into the page cache, exposing arbitrary disk and heap contents. I:H - __set_data_blkaddr() writes through the same out-of-bounds pointer, and with CONFIG_F2FS_CHECK_FS disabled the f2fs_bug_on degrades to WARN_ON so the underflowed, attacker-chosen count is passed to f2fs_truncate_data_blocks_range, yielding an attacker-controlled-length out-of-bounds write past the node folio plus invalidation of arbitrary filesystem blocks. A:H - With CONFIG_F2FS_CHECK_FS enabled this is a hard BUG_ON at fs/f2fs/file.c:1243 causing immediate kernel panic (as syzbot reported), and without it the out-of-bounds writes corrupt adjacent kernel memory and filesystem metadata, crashing the system.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 98e4da8ca301e062d79ae168c67e56f3c3de3ce4 to < 186098f34b8a5d65eb828f952c8cc56272c60ea0 (affected · git)98e4da8ca301e062d79ae168c67e56f3c3de3ce4 to < c18ecd99e0c707ef8f83cace861cbc3162f4fdf1 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 3.8 (affected)0 to < 3.8 (unaffected · semver)6.17.2 through 6.17.* (unaffected · semver)6.18 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
1Linux · cna
f2fs: fix to do sanity check on node footer for non inode dnode
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e6fda2b6c55c9e3c7350bc5889364a228d0e8bced1a1bba5924808810104edf5
- Ingested
- 23 Sep 2026, 08:48:04 UTC
- Source record
- Official CVE record