CVE-2025-38058
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Check your servers for CVE-2025-38058
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-38058 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:
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
... or we risk stealing final mntput from sync umount - raising mnt_count after umount(2) has verified that victim is not busy, but before it has set MNT_SYNC_UMOUNT; in that case __legitimize_mnt() doesn't see that it's safe to quietly undo mnt_count increment and leaves dropping the reference to caller, where it'll be a full-blown mntput().
Check under mount_lock is needed; leaving the current one done before taking that makes no sense - it's nowhere near common enough to bother with.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/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
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- 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.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 9.93% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 15 Oct 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 48a066e72d970a3e225a9c18690d570c736fc455, before 628fb00195ce21a90cf9e4e3d105cd9e58f77b40 affected from 48a066e72d970a3e225a9c18690d570c736fc455, before b89eb56a378b7b2c1176787fc228d0a57172bdd5 affected from 48a066e72d970a3e225a9c18690d570c736fc455, before f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42 affected from 48a066e72d970a3e225a9c18690d570c736fc455, before 9b0915e72b3cf52474dcee0b24a2f99d93e604a3 affected from 48a066e72d970a3e225a9c18690d570c736fc455, before d8ece4ced3b051e656c77180df2e69e19e24edc1 affected from 48a066e72d970a3e225a9c18690d570c736fc455, before 8cafd7266fa02e0863bacbf872fe635c0b9725eb affected from 48a066e72d970a3e225a9c18690d570c736fc455, before b55996939c71a3e1a38f3cdc6a8859797efc9083 affected from 48a066e72d970a3e225a9c18690d570c736fc455, before 250cf3693060a5f803c5f1ddc082bb06b16112a9
Other versions: unaffected
|
| Linux |
affected 3.13 unaffected before 3.13 unaffected from 5.4.294 up to and including 5.4.* unaffected from 5.10.238 up to and including 5.10.* unaffected from 5.15.185 up to and including 5.15.* unaffected from 6.1.141 up to and including 6.1.* unaffected from 6.6.93 up to and including 6.6.* unaffected from 6.12.31 up to and including 6.12.* unaffected from 6.14.9 up to and including 6.14.* unaffected 6.15 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-38058 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-38058
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-38058
trivy image --scanners vuln IMAGE | grep CVE-2025-38058
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/628fb00195ce21a90cf9e4e3d105cd9e58f77b40 git.kernel.org
- https://git.kernel.org/stable/c/b89eb56a378b7b2c1176787fc228d0a57172bdd5 git.kernel.org
- https://git.kernel.org/stable/c/f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42 git.kernel.org
- https://git.kernel.org/stable/c/9b0915e72b3cf52474dcee0b24a2f99d93e604a3 git.kernel.org
- https://git.kernel.org/stable/c/d8ece4ced3b051e656c77180df2e69e19e24edc1 git.kernel.org
- https://git.kernel.org/stable/c/8cafd7266fa02e0863bacbf872fe635c0b9725eb git.kernel.org
- https://git.kernel.org/stable/c/b55996939c71a3e1a38f3cdc6a8859797efc9083 git.kernel.org
- https://git.kernel.org/stable/c/250cf3693060a5f803c5f1ddc082bb06b16112a9 git.kernel.org
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html lists.debian.org
- https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html lists.debian.org
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html cert-portal.siemens.com
Source: the record CVE-2025-38058 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse