CVE-2025-38058

__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock

MEDIUM
5.5
CVSS Score
Published: June 18, 2025 at 09:33 AM UTC
Updated: October 15, 2026 at 10:18 PM UTC
5 products affected across 3 vendorsLinux KernelDebian LinuxSIMATIC S7-1500 CPU 1518-4 Pn /dp MFP Firmware

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 5.4.2945.11 ≤ v < 5.15.1855.16 ≤ v < 6.1.1415.5 ≤ v < 5.10.2386.13 ≤ v < 6.14.96.2 ≤ v < 6.6.936.7 ≤ v < 6.12.3148a066e72d970a3e225a9c18690d570c736fc4556.156.15 rc16.15 rc26.15 rc36.15 rc46.15 rc5
Vendor states this is fixed in 250cf3693060a5f803c5f1ddc082bb06b16112a9 (fixed)
Vendor states this is fixed in 628fb00195ce21a90cf9e4e3d105cd9e58f77b40 (fixed)
Vendor states this is fixed in 8cafd7266fa02e0863bacbf872fe635c0b9725eb (fixed)
Vendor states this is fixed in 9b0915e72b3cf52474dcee0b24a2f99d93e604a3 (fixed)
Vendor states this is fixed in b55996939c71a3e1a38f3cdc6a8859797efc9083 (fixed)
Vendor states this is fixed in b89eb56a378b7b2c1176787fc228d0a57172bdd5 (fixed)
Vendor states this is fixed in d8ece4ced3b051e656c77180df2e69e19e24edc1 (fixed)
Vendor states this is fixed in f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42 (fixed)
Vendor states this is fixed in 3.13 (unaffected)
Vendor states this is fixed in 5.10.238 (unaffected)
Vendor states this is fixed in 5.15.185 (unaffected)
Vendor states this is fixed in 5.4.294 (unaffected)
Vendor states this is fixed in 6.1.141 (unaffected)
Vendor states this is fixed in 6.12.31 (unaffected)
Vendor states this is fixed in 6.14.9 (unaffected)
Vendor states this is fixed in 6.15 (unaffected)
Vendor states this is fixed in 6.6.93 (unaffected)

References (11)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/250cf3693060a5f803c5f1ddc082bb06b16112a9
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/628fb00195ce21a90cf9e4e3d105cd9e58f77b40
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8cafd7266fa02e0863bacbf872fe635c0b9725eb
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9b0915e72b3cf52474dcee0b24a2f99d93e604a3
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b55996939c71a3e1a38f3cdc6a8859797efc9083
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b89eb56a378b7b2c1176787fc228d0a57172bdd5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d8ece4ced3b051e656c77180df2e69e19e24edc1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-667

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card