{"id":"CVE-2025-38058","aliases":["CVE-2025-38058"],"related":[],"kind":"vulnerability","state":"published","title":"__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\n__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock\n\n... or we risk stealing final mntput from sync umount - raising mnt_count\nafter umount(2) has verified that victim is not busy, but before it\nhas set MNT_SYNC_UMOUNT; in that case __legitimize_mnt() doesn't see\nthat it's safe to quietly undo mnt_count increment and leaves dropping\nthe reference to caller, where it'll be a full-blown mntput().\n\nCheck under mount_lock is needed; leaving the current one done before\ntaking that makes no sense - it's nowhere near common enough to bother\nwith.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\n__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock\n\n... or we risk stealing final mntput from sync umount - raising mnt_count\nafter umount(2) has verified that victim is not busy, but before it\nhas set MNT_SYNC_UMOUNT; in that case __legitimize_mnt() doesn't see\nthat it's safe to quietly undo mnt_count increment and leaves dropping\nthe reference to caller, where it'll be a full-blown mntput().\n\nCheck under mount_lock is needed; leaving the current one done before\ntaking that makes no sense - it's nowhere near common enough to bother\nwith.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: __legitimize_mnt(): la comprobación de MNT_SYNC_UMOUNT debe estar bajo mount_lock... o corremos el riesgo de robar la mntput final de sync umount, lo que genera mnt_count después de que umount(2) haya verificado que la víctima no está ocupada, pero antes de que haya establecido MNT_SYNC_UMOUNT. En ese caso, __legitimize_mnt() no considera que sea seguro deshacer silenciosamente el incremento de mnt_count y continúa eliminando la referencia al llamador, donde se ejecutará una mntput() completa. Es necesaria la comprobación bajo mount_lock; dejar la actual activada antes de tomarla no tiene sentido; no es lo suficientemente común como para molestarse en hacerlo.","source":"nvd"}],"published":"2025-06-18T09:33:38.022Z","modified":"2026-10-15T22:18:25.120Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"628fb00195ce21a90cf9e4e3d105cd9e58f77b40","status":"affected"},{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"b89eb56a378b7b2c1176787fc228d0a57172bdd5","status":"affected"},{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42","status":"affected"},{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"9b0915e72b3cf52474dcee0b24a2f99d93e604a3","status":"affected"},{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"d8ece4ced3b051e656c77180df2e69e19e24edc1","status":"affected"},{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"8cafd7266fa02e0863bacbf872fe635c0b9725eb","status":"affected"},{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"b55996939c71a3e1a38f3cdc6a8859797efc9083","status":"affected"},{"type":"git","introduced":"48a066e72d970a3e225a9c18690d570c736fc455","fixed":"250cf3693060a5f803c5f1ddc082bb06b16112a9","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.13","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.13","status":"unaffected"},{"type":"semver","introduced":"5.4.294","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.238","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.185","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.141","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.93","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.31","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.14.9","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"5.4.294"},{"status":"affected","introduced":"5.5","fixed":"5.10.238"},{"status":"affected","introduced":"5.11","fixed":"5.15.185"},{"status":"affected","introduced":"5.16","fixed":"6.1.141"},{"status":"affected","introduced":"6.2","fixed":"6.6.93"},{"status":"affected","introduced":"6.7","fixed":"6.12.31"},{"status":"affected","introduced":"6.13","fixed":"6.14.9"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"},{"status":"affected","version":"6.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/628fb00195ce21a90cf9e4e3d105cd9e58f77b40","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b89eb56a378b7b2c1176787fc228d0a57172bdd5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f6d45fd92f62845cbd1eb5128fd8f0ed7d0c5a42","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9b0915e72b3cf52474dcee0b24a2f99d93e604a3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d8ece4ced3b051e656c77180df2e69e19e24edc1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8cafd7266fa02e0863bacbf872fe635c0b9725eb","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b55996939c71a3e1a38f3cdc6a8859797efc9083","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/250cf3693060a5f803c5f1ddc082bb06b16112a9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:46:56.186Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38058","url":"https://www.cve.org/CVERecord?id=CVE-2025-38058","licence":"CVE Terms of Use","modified":"2026-10-15T21:52:06.947Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38058","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38058","licence":"Public domain","modified":"2026-10-15T22:18:25.120Z"}],"updatedAt":"2026-11-25T22:58:59.362Z","epss":{"score":0.00197,"percentile":0.09925,"date":"2026-12-01T12:00:22.000Z"}}