CVE-2025-38172
erofs: avoid using multiple devices with different type
Check your servers for CVE-2025-38172
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-38172 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.
Description
In the Linux kernel, the following vulnerability has been resolved:
erofs: avoid using multiple devices with different type
For multiple devices, both primary and extra devices should be the same type. `erofs_init_device` has already guaranteed that if the primary is a file-backed device, extra devices should also be regular files.
However, if the primary is a block device while the extra device is a file-backed device, `erofs_init_device` will get an ENOTBLK, which is not treated as an error in `erofs_fc_get_tree`, and that leads to an UAF:
erofs_fc_get_tree get_tree_bdev_flags(erofs_fc_fill_super) erofs_read_superblock erofs_init_device // sbi->dif0 is not inited yet, // return -ENOTBLK deactivate_locked_super free(sbi) if (err is -ENOTBLK) sbi->dif0.file = filp_open() // sbi UAF
So if -ENOTBLK is hitted in `erofs_init_device`, it means the primary device must be a block device, and the extra device is not a block device. The error can be converted to -EINVAL.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/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 high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 8.42% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from fb176750266a3d7f42ebdcf28e8ba40350b27847, before 65115472f741ca000d7ea4a5922214f93cd1516e affected from fb176750266a3d7f42ebdcf28e8ba40350b27847, before cd04beb9ce2773a16057248bb4fa424068ae3807 affected from fb176750266a3d7f42ebdcf28e8ba40350b27847, before 9748f2f54f66743ac77275c34886a9f890e18409
Other versions: unaffected
|
| Linux |
affected 6.12 unaffected before 6.12 unaffected from 6.12.34 up to and including 6.12.* unaffected from 6.15.3 up to and including 6.15.* unaffected 6.16 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-38172 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38172
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-38172
trivy image --scanners vuln IMAGE | grep CVE-2025-38172
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
- https://git.kernel.org/stable/c/65115472f741ca000d7ea4a5922214f93cd1516e git.kernel.org
- https://git.kernel.org/stable/c/cd04beb9ce2773a16057248bb4fa424068ae3807 git.kernel.org
- https://git.kernel.org/stable/c/9748f2f54f66743ac77275c34886a9f890e18409 git.kernel.org
Source: the record CVE-2025-38172 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.
Vulnpocalypse