{"id":"CVE-2026-99703","summary":"mm/hugetlb: fix mremap deadlock when PMD sharing is possible","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: fix mremap deadlock when PMD sharing is possible\n\nmove_hugetlb_page_tables() holds the mapping's i_mmap_rwsem for\nwrite while moving hugetlb PTEs. This prevents races with truncation\nand protects huge_pmd_unshare(), but the move loop must not call\nhelpers that can acquire the same rwsem for read.\n\nhuge_pte_alloc() can do that when the destination can use PMD\nsharing: it may call huge_pmd_share(), which takes i_mmap_rwsem for\nread while searching for a shareable PMD table. Calling it while the\nmove path already holds i_mmap_rwsem for write can deadlock.\n\nAvoid that path for PMD-sized hugetlb mappings that can use PMD\nsharing. Instead of allocating or sharing the destination page table\nwhile moving, zap the source range and let the destination fault path\npopulate or share the PMD lazily.\n\nReuse the hugetlb unmap logic for the source-side zap by splitting\nthe core loop out of __unmap_hugepage_range(). The wrapper keeps the\nexisting tlb_start_vma(), tlb_end_vma() and huge_pmd_unshare_flush()\nbehavior, while move_hugetlb_page_tables() can reuse the unmap loop\nwith its existing mmu_gather.","modified":"2026-11-20T07:01:10.544631731Z","published":"2026-11-20T05:50:44.751Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99703.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/71568db3f9d90c373881c6d438db9afc47a1755b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/92daa8652f88c8cfc05f4899a8408a04b02f211e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dd2381dabe0761b6a200a9b4f2eca280e5986faa"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99703.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99703"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"550a7d60bd5e35a56942dba6d8a26752beb26c9f"},{"fixed":"dd2381dabe0761b6a200a9b4f2eca280e5986faa"},{"fixed":"71568db3f9d90c373881c6d438db9afc47a1755b"},{"fixed":"92daa8652f88c8cfc05f4899a8408a04b02f211e"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99703.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.18.64"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99703.json"}}],"schema_version":"1.9.2"}