CVE-2025-38058
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Reported by linux · Published June 18, 2025
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-libbpf | Amazon Linux | 6.1.141-155.222.amzn2023 |
| kernel-headers | Amazon Linux | 6.1.141-155.222.amzn2023 |
| perf | Amazon Linux | 6.1.141-155.222.amzn2023, 4.14.355-280.664.amzn2 |
| kernel-tools | Amazon Linux | 4.14.355-280.664.amzn2 |
| kernel-libbpf-devel | Amazon Linux | 6.1.141-155.222.amzn2023 |
| kernel-livepatch-6.1.141-155.222 | Amazon Linux | 1.0-0.amzn2023 |
| python3-perf6.12 | Amazon Linux | 6.12.31-35.92.amzn2023 |
| kernel-livepatch-6.12.31-35.92 | Amazon Linux | 1.0-0.amzn2023 |
| kernel-devel | Amazon Linux | 6.1.141-155.222.amzn2023 |
| kernel6.12 | Amazon Linux | 6.12.31-35.92.amzn2023 |
| kernel6.12-modules-extra | Amazon Linux | 6.12.31-35.92.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 6.1.141-155.222.amzn2023 |
4 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 48a066e72d970a3e225a9c18690d570c736fc455, 48a066e72d970a3e225a9c18690d570c736fc455, 48a066e72d970a3e225a9c18690d570c736fc455 |
| Linux | Linux | 3.13, 0, 5.4.294 |
| amazon:2023 | kernel-libbpf | 0 |
| amazon:2023 | kernel-headers | 0 |
| amazon:2 | perf | 0 |
| amazon:2 | kernel-tools | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | kernel-livepatch-6.1.141-155.222 | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel-livepatch-6.12.31-35.92 | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel6.12 | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | perf6.12 | 0 |
| Linux | Linux | 6.14.9, 48a066e72d970a3e225a9c18690d570c736fc455, 48a066e72d970a3e225a9c18690d570c736fc455 |
| amazon:2 | kernel-devel | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | 3.1.5 |
…and 15 more
Timeline
- Jun 17, 2025 CVE Published
- Jun 18, 2025 EPSS Score (30 in total, the first dated here)
- Oct 12, 2025 PoC Published (16 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (320 in total, the first dated here)
- Mar 29, 2026 Security Advisory (332 in total, the first dated here)
- Jun 9, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-38058
vulnetix vdb fixes CVE-2025-38058
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-38058/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart