# CVE-2025-38058: \_\_legitimize\_mnt(): check for MNT\_SYNC\_UMOUNT should be under mount\_lock

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-28)
- **CWE:** CWE-667
- **Published:** 2025-06-18T09:33:38.022Z
- **Modified:** 2026-10-15T22:18:25.120Z

## Who should check

- Anyone running Linux \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 628fb00195ce21a90cf9e4e3d105cd9e58f77b40; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< b89eb56a378b7b2c1176787fc228d0a57172bdd5; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 9b0915e72b3cf52474dcee0b24a2f99d93e604a3; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< d8ece4ced3b051e656c77180df2e69e19e24edc1; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 8cafd7266fa02e0863bacbf872fe635c0b9725eb; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< b55996939c71a3e1a38f3cdc6a8859797efc9083; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 250cf3693060a5f803c5f1ddc082bb06b16112a9
- Anyone running Linux 3.13

## 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.

## Affected and fixed versions

- Linux: \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 628fb00195ce21a90cf9e4e3d105cd9e58f77b40; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< b89eb56a378b7b2c1176787fc228d0a57172bdd5; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 9b0915e72b3cf52474dcee0b24a2f99d93e604a3; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< d8ece4ced3b051e656c77180df2e69e19e24edc1; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 8cafd7266fa02e0863bacbf872fe635c0b9725eb; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< b55996939c71a3e1a38f3cdc6a8859797efc9083; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 250cf3693060a5f803c5f1ddc082bb06b16112a9 (cvelist)
- Linux: 3.13 (cvelist)

## Mitigation

- Upgrade Linux to 250cf3693060a5f803c5f1ddc082bb06b16112a9 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38058. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38058.md
Affected: Linux >= 48a066e72d970a3e225a9c18690d570c736fc455, < 628fb00195ce21a90cf9e4e3d105cd9e58f77b40; >= 48a066e72d970a3e225a9c18690d570c736fc455, < b89eb56a378b7b2c1176787fc228d0a57172bdd5; >= 48a066e72d970a3e225a9c18690d570c736fc455, < f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42; >= 48a066e72d970a3e225a9c1…
Fixed in: Linux 628fb00195ce21a90cf9e4e3d105cd9e58f77b40, Linux 9b0915e72b3cf52474dcee0b24a2f99d93e604a3, Linux 8cafd7266fa02e0863bacbf872fe635c0b9725eb, Linux 250cf3693060a5f803c5f1ddc082bb06b16112a9

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38058 being exploited?

There is no confirmed exploitation: CVE-2025-38058 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2025-38058?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-38058?

Linux \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 628fb00195ce21a90cf9e4e3d105cd9e58f77b40; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< b89eb56a378b7b2c1176787fc228d0a57172bdd5; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 9b0915e72b3cf52474dcee0b24a2f99d93e604a3; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< d8ece4ced3b051e656c77180df2e69e19e24edc1; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 8cafd7266fa02e0863bacbf872fe635c0b9725eb; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< b55996939c71a3e1a38f3cdc6a8859797efc9083; \>= 48a066e72d970a3e225a9c18690d570c736fc455, \< 250cf3693060a5f803c5f1ddc082bb06b16112a9; Linux 3.13.

### Is there a fix for CVE-2025-38058?

Yes. Fixed in Linux 628fb00195ce21a90cf9e4e3d105cd9e58f77b40, Linux 9b0915e72b3cf52474dcee0b24a2f99d93e604a3, Linux 8cafd7266fa02e0863bacbf872fe635c0b9725eb, Linux 250cf3693060a5f803c5f1ddc082bb06b16112a9. Upgrade Linux to 250cf3693060a5f803c5f1ddc082bb06b16112a9 or later.

### How do I check if I'm affected by CVE-2025-38058?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/628fb00195ce21a90cf9e4e3d105cd9e58f77b40>
- patch: <https://git.kernel.org/stable/c/b89eb56a378b7b2c1176787fc228d0a57172bdd5>
- patch: <https://git.kernel.org/stable/c/f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42>
- patch: <https://git.kernel.org/stable/c/9b0915e72b3cf52474dcee0b24a2f99d93e604a3>
- patch: <https://git.kernel.org/stable/c/d8ece4ced3b051e656c77180df2e69e19e24edc1>
- patch: <https://git.kernel.org/stable/c/8cafd7266fa02e0863bacbf872fe635c0b9725eb>
- patch: <https://git.kernel.org/stable/c/b55996939c71a3e1a38f3cdc6a8859797efc9083>
- patch: <https://git.kernel.org/stable/c/250cf3693060a5f803c5f1ddc082bb06b16112a9>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38058>

HTML: <https://flawdb.com/CVE-2025-38058> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38058>
