__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.238, 5.15.185, 5.4.294, 6.1.141, 6.12.31, 6.14.9, 6.6.93
- CVEs
- CVE-2025-38058
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 10:37 UTC · Revision 1
Source evidence
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
core-osv · Original sourcePublished 18 Jun 2025, 09:33 UTC
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.
osv:CVE-2025-38058
Kernel
Fixed versions: 5.4.294, 5.10.238, 5.15.185, 6.1.141, 6.6.93, 6.12.31, 6.14.9
Complete source record
{
"id": "2b433f14507c439e9bcfe7c75a18b6b609955bade88725471acc996a3d95c56d",
"url": "https://osv.dev/vulnerability/CVE-2025-38058",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock",
"summary": "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.",
"evidence": "osv:CVE-2025-38058",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.294",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.238",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.185",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.141",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.93",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.31",
"evidence": "/affected/1/ranges"
},
{
"value": "6.14.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-38058",
"aliases": [
"CVE-2025-38058"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "48a066e72d970a3e225a9c18690d570c736fc455"
},
{
"fixed": "628fb00195ce21a90cf9e4e3d105cd9e58f77b40"
},
{
"fixed": "b89eb56a378b7b2c1176787fc228d0a57172bdd5"
},
{
"fixed": "f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42"
},
{
"fixed": "9b0915e72b3cf52474dcee0b24a2f99d93e604a3"
},
{
"fixed": "d8ece4ced3b051e656c77180df2e69e19e24edc1"
},
{
"fixed": "8cafd7266fa02e0863bacbf872fe635c0b9725eb"
},
{
"fixed": "b55996939c71a3e1a38f3cdc6a8859797efc9083"
},
{
"fixed": "250cf3693060a5f803c5f1ddc082bb06b16112a9"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38058.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "3.13.0"
},
{
"fixed": "5.4.294"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.238"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.185"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.141"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.93"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.31"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.14.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38058.json"
}
}
],
"modified": "2026-10-28T02:30:28.045022848Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/html/ssa-082556.html",
"https://git.kernel.org/stable/c/250cf3693060a5f803c5f1ddc082bb06b16112a9",
"https://git.kernel.org/stable/c/628fb00195ce21a90cf9e4e3d105cd9e58f77b40",
"https://git.kernel.org/stable/c/8cafd7266fa02e0863bacbf872fe635c0b9725eb",
"https://git.kernel.org/stable/c/9b0915e72b3cf52474dcee0b24a2f99d93e604a3",
"https://git.kernel.org/stable/c/b55996939c71a3e1a38f3cdc6a8859797efc9083",
"https://git.kernel.org/stable/c/b89eb56a378b7b2c1176787fc228d0a57172bdd5",
"https://git.kernel.org/stable/c/d8ece4ced3b051e656c77180df2e69e19e24edc1",
"https://git.kernel.org/stable/c/f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42",
"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html",
"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38058.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-38058",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38058.json"
}
},
"related_cves": [
{
"value": "CVE-2025-38058",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 494611,
"published_at": "2025-06-18T09:33:38.022+00:00"
}