CVE-2025-38652

f2fs: fix to avoid out-of-boundary access in devs.path

7.3 high EPSS 0.21%

Published 22 Aug 2025 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2025-38652

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-38652 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Severity (CVSS)

7.3 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
required: a user has to do something, such as open a link or a file
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity low, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.2% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before dc0172c74bd9edaee7bea2ebb35f3dbd37a8ae80
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 1cf1ff15f262e8baf12201b270b6a79f9d119b2d
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 666b7cf6ac9aa074b8319a2b68cba7f2c30023f0
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 3466721f06edff834f99d9f49f23eabc6b2cb78e
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 345fc8d1838f3f8be7c8ed08d86a13dedef67136
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 70849d33130a2cf1d6010069ed200669c8651fbd
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 755427093e4294ac111c3f9e40d53f681a0fbdaa
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 1b1efa5f0e878745e94a98022e8edc675a87d78e
affected from 3c62be17d4f562f43fe1d03b48194399caa35aa5, before 5661998536af52848cc4d52a377e90368196edea
Other versions: unaffected
Linux
affected 4.10
unaffected before 4.10
unaffected from 5.4.297 up to and including 5.4.*
unaffected from 5.10.241 up to and including 5.10.*
unaffected from 5.15.190 up to and including 5.15.*
unaffected from 6.1.148 up to and including 6.1.*
unaffected from 6.6.102 up to and including 6.6.*
unaffected from 6.12.42 up to and including 6.12.*
unaffected from 6.15.10 up to and including 6.15.*
unaffected from 6.16.1 up to and including 6.16.*
unaffected 6.17 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-38652 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38652

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-38652
trivy image --scanners vuln IMAGE | grep CVE-2025-38652

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-38652 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.