CVE-2025-38677: f2fs: fix to avoid out-of-boundary access in dnode page
In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix to avoid out-of-boundary access in dnode page
As Jiaming Zhang reported:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x1c1/0x2a0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x17e/0x800 mm/kasan/report.c:480
kasan_report+0x147/0x180 mm/kasan/report.c:593
data_blkaddr fs/f2fs/f2fs.h:3053 [inline]
f2fs_data_blkaddr fs/f2fs/f2fs.h:3058 [inline]
f2fs_get_dnode_of_data+0x1a09/0x1c40 fs/f2fs/node.c:855
f2fs_reserve_block+0x53/0x310 fs/f2fs/data.c:1195
prepare_write_begin fs/f2fs/data.c:3395 [inline]
f2fs_write_begin+0xf39/0x2190 fs/f2fs/data.c:3594
generic_perform_write+0x2c7/0x910 mm/filemap.c:4112
f2fs_buffered_write_iter fs/f2fs/file.c:4988 [inline]
f2fs_file_write_iter+0x1ec8/0x2410 fs/f2fs/file.c:5216
new_sync_write fs/read_write.c:593 [inline]
vfs_write+0x546/0xa90 fs/read_write.c:686
ksys_write+0x149/0x250 fs/read_write.c:738
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xf3/0x3d0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The root cause is in the corrupted image, there is a dnode has the same
node id w/ its inode, so during f2fs_get_dnode_of_data(), it tries to
access block address in dnode at offset 934, however it parses the dnode
as inode node, so that get_dnode_addr() returns 360, then it tries to
access page address from 360 + 934 * 4 = 4096 w/ 4 bytes.
To fix this issue, let's add sanity check for node id of all direct nodes
during f2fs_get_dnode_of_data().
Security readout for executives and security teams
Plain-English summary
CVE-2025-38677 is a Linux kernel F2FS filesystem bug triggered by a corrupted filesystem image. The kernel can read beyond the expected dnode page boundary while preparing a write. Business impact depends on whether systems use F2FS or mount untrusted/removable F2FS media. No active exploitation is cited in the provided sources.
Executive priority
Treat this as targeted kernel hygiene rather than an internet-wide emergency. Patch during normal kernel maintenance unless F2FS or removable media is common in your environment; then prioritize sooner because malformed filesystem input reaches kernel code.
Technical view
In f2fs_get_dnode_of_data(), a corrupted image can make a dnode share the inode node id. The code then parses the dnode as an inode node and calculates an out-of-boundary address. The upstream fix adds sanity checks for direct-node ids during dnode lookup. Affected Linux versions and stable backport commits are listed in the CVE bundle.
Likely exposure
Exposure is most likely on Linux systems using F2FS, especially where users, devices, or services can provide filesystem images or removable storage. Systems that do not enable or mount F2FS are less likely exposed. Exact distribution exposure requires checking vendor kernel packages and backports.
Exploitation context
The provided bundle describes a crash report from KASAN against a corrupted image, not public exploitation. KEV is false, and no cited source states active exploitation. The vulnerability appears to require interaction with a malformed F2FS filesystem image or media.
Researcher notes
The source evidence gives root cause and fix direction but lacks CVSS, CWE, exploitability analysis, or privilege-boundary details. Assessment should focus on F2FS mount paths, malformed-image handling, and whether distro kernels carry the sanity-check backport.
Mitigation direction
Apply kernel updates from the Linux stable tree or your distribution vendor.
Prioritize systems that mount F2FS or accept removable or user-supplied media.
Avoid mounting untrusted F2FS filesystem images until patched.
Restrict mount privileges and removable-media handling on shared systems.
Track Debian, Siemens, and vendor advisories for packaged fixes.
Validation and detection
Inventory Linux kernel versions across affected fleets.
Check whether F2FS is enabled, loaded, or used for mounted filesystems.
Confirm the relevant stable fix commit is included in deployed kernels.
Review distribution changelogs for CVE-2025-38677 backports.
Verify controls preventing untrusted users from mounting filesystem images.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38677 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
2ADP providers
12Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Aug 30, 2025, 09:19 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.