CVE-2025-38652: f2fs: fix to avoid out-of-boundary access in devs.path
In the Linux kernel, the following vulnerability has been resolved:
f2fs: fix to avoid out-of-boundary access in devs.path
- touch /mnt/f2fs/012345678901234567890123456789012345678901234567890123
- truncate -s $((1024*1024*1024)) \
/mnt/f2fs/012345678901234567890123456789012345678901234567890123
- touch /mnt/f2fs/file
- truncate -s $((1024*1024*1024)) /mnt/f2fs/file
- mkfs.f2fs /mnt/f2fs/012345678901234567890123456789012345678901234567890123 \
-c /mnt/f2fs/file
- mount /mnt/f2fs/012345678901234567890123456789012345678901234567890123 \
/mnt/f2fs/loop
[16937.192225] F2FS-fs (loop0): Mount Device [ 0]: /mnt/f2fs/012345678901234567890123456789012345678901234567890123\xff\x01, 511, 0 - 3ffff
[16937.192268] F2FS-fs (loop0): Failed to find devices
If device path length equals to MAX_PATH_LEN, sbi->devs.path[] may
not end up w/ null character due to path array is fully filled, So
accidently, fields locate after path[] may be treated as part of
device path, result in parsing wrong device path.
struct f2fs_dev_info {
...
char path[MAX_PATH_LEN];
...
};
Let's add one byte space for sbi->devs.path[] to store null
character of device path string.
Security readout for executives and security teams
Plain-English summary
A Linux F2FS filesystem path at the maximum permitted length may lack proper string termination. During mounting, the kernel can mistake nearby memory for part of the path, potentially causing incorrect device handling, information exposure, or service disruption. Exploitation requires local access and user interaction involving a crafted F2FS filesystem.
Executive priority
Prioritize systems that mount externally supplied or user-controlled F2FS media or images. Treat internet-only servers without F2FS workflows as lower urgency, while still applying normal supported-kernel updates. No active exploitation is established by the supplied evidence.
Technical view
The F2FS device-path buffer could be completely filled without a trailing null byte. Subsequent parsing may read adjacent fields as path data, producing an out-of-bounds access and an incorrect device path. The supplied CVSS 3.1 score is 7.3, with local attack vector, low complexity, no privileges, user interaction, and high confidentiality and availability impacts.
Likely exposure
Exposure is concentrated on Linux systems that enable and mount F2FS, particularly workflows accepting removable media, filesystem images, or other untrusted storage. Systems not using F2FS are unlikely to reach the vulnerable path. The supplied version data is complex; validate exposure against the running distribution kernel and its vendor advisory.
Exploitation context
The supplied record is not in KEV and provides no evidence of active exploitation. The demonstrated condition requires a specially constructed F2FS configuration and a mount action. This is therefore more relevant to endpoints, appliances, and services that process untrusted filesystem images than to ordinary remote network exposure.
Researcher notes
The defect concerns boundary-sized device paths and absent null termination in f2fs_dev_info.path. Adjacent structure fields may be consumed during string parsing. Stable kernel commits add space for the terminator. The supplied version entries should not be treated as a simple continuous affected range without branch-specific or distribution confirmation.
Mitigation direction
Install a vendor-supported kernel containing the applicable stable F2FS fix.
Check distribution advisories to map fixed upstream commits to packaged kernel versions.
Restrict mounting of untrusted F2FS filesystems until affected systems are updated.
Limit filesystem-mount capabilities to trusted administrators and controlled services.
Validation and detection
Inventory systems with F2FS enabled, mounted, or used in image-processing workflows.
Record running kernel and distribution package versions on exposed systems.
Confirm vendor packages incorporate the relevant upstream stable commit.
Review mount services and automation for acceptance of untrusted filesystem images.
Monitor kernel logs for F2FS device-discovery failures or malformed path output.
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-38652 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.
1CVSS vectors
3Timeline events
1ADP providers
12Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.