{"id":"CVE-2025-38084","aliases":["CVE-2025-38084"],"related":[],"kind":"vulnerability","state":"published","title":"mm/hugetlb: unshare page tables during VMA split, not before","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: unshare page tables during VMA split, not before\n\nCurrently, __split_vma() triggers hugetlb page table unsharing through\nvm_ops->may_split().  This happens before the VMA lock and rmap locks are\ntaken - which is too early, it allows racing VMA-locked page faults in our\nprocess and racing rmap walks from other processes to cause page tables to\nbe shared again before we actually perform the split.\n\nFix it by explicitly calling into the hugetlb unshare logic from\n__split_vma() in the same place where THP splitting also happens.  At that\npoint, both the VMA and the rmap(s) are write-locked.\n\nAn annoying detail is that we can now call into the helper\nhugetlb_unshare_pmds() from two different locking contexts:\n\n1. from hugetlb_split(), holding:\n    - mmap lock (exclusively)\n    - VMA lock\n    - file rmap lock (exclusively)\n2. hugetlb_unshare_all_pmds(), which I think is designed to be able to\n   call us with only the mmap lock held (in shared mode), but currently\n   only runs while holding mmap lock (exclusively) and VMA lock\n\nBackporting note:\nThis commit fixes a racy protection that was introduced in commit\nb30c14cd6102 (\"hugetlb: unshare some PMDs when splitting VMAs\"); that\ncommit claimed to fix an issue introduced in 5.13, but it should actually\nalso go all the way back.\n\n[jannh@google.com: v2]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: unshare page tables during VMA split, not before\n\nCurrently, __split_vma() triggers hugetlb page table unsharing through\nvm_ops->may_split().  This happens before the VMA lock and rmap locks are\ntaken - which is too early, it allows racing VMA-locked page faults in our\nprocess and racing rmap walks from other processes to cause page tables to\nbe shared again before we actually perform the split.\n\nFix it by explicitly calling into the hugetlb unshare logic from\n__split_vma() in the same place where THP splitting also happens.  At that\npoint, both the VMA and the rmap(s) are write-locked.\n\nAn annoying detail is that we can now call into the helper\nhugetlb_unshare_pmds() from two different locking contexts:\n\n1. from hugetlb_split(), holding:\n    - mmap lock (exclusively)\n    - VMA lock\n    - file rmap lock (exclusively)\n2. hugetlb_unshare_all_pmds(), which I think is designed to be able to\n   call us with only the mmap lock held (in shared mode), but currently\n   only runs while holding mmap lock (exclusively) and VMA lock\n\nBackporting note:\nThis commit fixes a racy protection that was introduced in commit\nb30c14cd6102 (\"hugetlb: unshare some PMDs when splitting VMAs\"); that\ncommit claimed to fix an issue introduced in 5.13, but it should actually\nalso go all the way back.\n\n[jannh@google.com: v2]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/hugetlb: dejar de compartir tablas de páginas durante la división de VMA, no antes. Actualmente, __split_vma() activa la descompartición de la tabla de páginas hugetlb a través de vm_ops-&gt;may_split(). Esto sucede antes de que se tomen los bloqueos de VMA y rmap, lo cual es demasiado pronto, ya que permite que las fallas de página bloqueadas por VMA en nuestro proceso y los recorridos rmap de otros procesos provoquen que las tablas de páginas se compartan de nuevo antes de que realmente realicemos la división. Corríjalo llamando explícitamente a la lógica de descompartir hugetlb desde __split_vma() en el mismo lugar donde también ocurre la división de THP. En ese punto, tanto el VMA como los rmap están bloqueados contra escritura. Un detalle molesto es que ahora podemos llamar al asistente hugetlb_unshare_pmds() desde dos contextos de bloqueo diferentes: 1. desde hugetlb_split(), que contiene: - bloqueo mmap (exclusivamente) - bloqueo VMA - bloqueo rmap de archivo (exclusivamente) 2. hugetlb_unshare_all_pmds(), que creo que está diseñado para poder llamarnos con solo el bloqueo mmap mantenido (en modo compartido), pero actualmente solo se ejecuta mientras se mantiene el bloqueo mmap (exclusivamente) y el bloqueo VMA. Nota de retroportación: Este commit corrige una protección contra la exposición a riesgos que se introdujo en el commit b30c14cd6102 (\"hugetlb: dejar de compartir algunos PMD al dividir VMA\"); es commit afirmaba corregir un problema introducido en la versión 5.13, pero en realidad también debería retroceder. [jannh@google.com: v2]","source":"nvd"}],"published":"2025-06-28T07:44:25.379Z","modified":"2026-10-15T22:18:26.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":[],"affected":[{"ranges":[{"type":"git","introduced":"39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa","fixed":"e8847d18cd9fff1edbb45e963d9141273c3b539c","status":"affected"},{"type":"git","introduced":"39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa","fixed":"366298f2b04d2bf1f2f2b7078405bdf9df9bd5d0","status":"affected"},{"type":"git","introduced":"39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa","fixed":"2511ac64bc1617ca716d3ba8464e481a647c1902","status":"affected"},{"type":"git","introduced":"39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa","fixed":"af6cfcd0efb7f051af221c418ec8b37a10211947","status":"affected"},{"type":"git","introduced":"39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa","fixed":"9cf5b2a3b72c23fb7b84736d5d19ee6ea718762b","status":"affected"},{"type":"git","introduced":"39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa","fixed":"8a21d5584826f4880f45bbf8f72375f4e6c0ff2a","status":"affected"},{"type":"git","introduced":"39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa","fixed":"081056dc00a27bccb55ccc3c6f230a3d5fd3f7e0","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.20","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.20","status":"unaffected"},{"type":"semver","introduced":"5.10.239","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.186","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.142","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.95","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.35","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.4","lastAffected":"6.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.16","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","introduced":"2.6.20","fixed":"5.10.239"},{"status":"affected","introduced":"5.11","fixed":"5.15.186"},{"status":"affected","introduced":"5.16","fixed":"6.1.142"},{"status":"affected","introduced":"6.2","fixed":"6.6.95"},{"status":"affected","introduced":"6.7","fixed":"6.12.35"},{"status":"affected","introduced":"6.13","fixed":"6.15.4"}],"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/e8847d18cd9fff1edbb45e963d9141273c3b539c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/366298f2b04d2bf1f2f2b7078405bdf9df9bd5d0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2511ac64bc1617ca716d3ba8464e481a647c1902","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/af6cfcd0efb7f051af221c418ec8b37a10211947","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9cf5b2a3b72c23fb7b84736d5d19ee6ea718762b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8a21d5584826f4880f45bbf8f72375f4e6c0ff2a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/081056dc00a27bccb55ccc3c6f230a3d5fd3f7e0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://project-zero.issues.chromium.org/issues/420715744","tags":["third-party-advisory"],"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"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-15T21:47:11.964Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38084","url":"https://www.cve.org/CVERecord?id=CVE-2025-38084","licence":"CVE Terms of Use","modified":"2026-10-15T21:52:07.643Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38084","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38084","licence":"Public domain","modified":"2026-10-15T22:18:26.120Z"}],"updatedAt":"2026-11-25T22:59:00.334Z","epss":{"score":0.00233,"percentile":0.1519,"date":"2026-12-01T12:00:22.000Z"}}