CVE-2025-38085
JSON

7.8high

mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.17% (higher than 6% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race huge_pmd_unshare() drops a reference on a page table that may have previously been shared across processes, potentially turning it into a normal page table used in another process in which unrelated VMAs can afterwards be installed. If this happens in the middle of a concurrent gup_fast(), gup_fast() could end up walking the page tables of another process. While I don't see any way in which that immediately leads to kernel memory corruption, it is really weird and unexpected. Fix it with an explicit broadcast IPI through tlb_remove_table_sync_one(), just like we do in khugepaged when removing page tables for a THP collapse.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa before 952596b08c74e8fe9e2883d1dc8a8f54a37384ec, from 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa before a3d864c901a300c295692d129159fc3001a56185, from 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa before b7754d3aa7bf9f62218d096c0c8f6c13698fac8b, from 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa before fe684290418ef9ef76630072086ee530b92f02b8, from 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa before 034a52b5ef57c9c8225d94e9067f3390bb33922f, from 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa before a6bfeb97941a9187833b526bc6cc4ff5706d0ce9, from 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa before 1013af4f585fccc4d3e5c5824d174de2257f7d6d, 2.6.20
Not affected: before 2.6.20, from 5.10.239 up to 5.10.*, from 5.15.186 up to 5.15.*, from 6.1.142 up to 6.1.*, from 6.6.95 up to 6.6.*, from 6.12.35 up to 6.12.*
CVE List
linux linux_kernelfrom 2.6.20 before 5.10.239, from 5.11 before 5.15.186, from 5.16 before 6.1.142, from 6.2 before 6.6.95, from 6.7 before 6.12.35, from 6.13 before 6.15.4NVD
debian debian_linux11.0NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD4.7medium CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-362

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race huge_pmd_unshare() drops a reference on a page table that may have previously been shared across processes, potentially turning it into a normal page table used in another process in which unrelated VMAs can afterwards be installed. If this happens in the middle of a concurrent gup_fast(), gup_fast() could end up walking the page tables of another process. While I don't see any way in which that immediately leads to kernel memory corruption, it is really weird and unexpected. Fix it with an explicit broadcast IPI through tlb_remove_table_sync_one(), just like we do in khugepaged when removing page tables for a THP collapse.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/hugetlb: corrección de huge_pmd_unshare() frente a la competencia GUP-fast. huge_pmd_unshare() elimina una referencia en una tabla de páginas que podría haber sido compartida previamente entre procesos, lo que podría convertirla en una tabla de páginas normal utilizada por otro proceso en la que posteriormente se podrían instalar VMAs no relacionadas. Si esto ocurre durante una ejecución simultánea de gup_fast(), gup_fast() podría terminar recorriendo las tablas de páginas de otro proceso. Si bien no veo ninguna forma en que esto provoque inmediatamente una corrupción de memoria en el kernel, es realmente extraño e inesperado. Corríjalo con una IPI de difusión explícita a través de tlb_remove_table_sync_one(), tal como hacemos en khugepaged al eliminar tablas de páginas durante un colapso de THP.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-38085 changed 2026-08-05CVE Terms of Use
NVDCVE-2025-38085 changed 2026-07-30Public domain