CVE-2026-99703: mm/hugetlb: fix mremap deadlock when PMD sharing is possible

Published Nov 20, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mm/hugetlb: fix mremap deadlock when PMD sharing is possible

movehugetlbpagetables() holds the mapping's immaprwsem for write while moving hugetlb PTEs. This prevents races with truncation and protects hugepmdunshare(), but the move loop must not call helpers that can acquire the same rwsem for read.

hugeptealloc() can do that when the destination can use PMD sharing: it may call hugepmdshare(), which takes immaprwsem for read while searching for a shareable PMD table. Calling it while the move path already holds immaprwsem for write can deadlock.

Avoid that path for PMD-sized hugetlb mappings that can use PMD sharing. Instead of allocating or sharing the destination page table while moving, zap the source range and let the destination fault path populate or share the PMD lazily.

Reuse the hugetlb unmap logic for the source-side zap by splitting the core loop out of unmaphugepagerange(). The wrapper keeps the existing tlbstartvma(), tlbendvma() and hugepmdunshareflush() behavior, while movehugetlbpagetables() can reuse the unmap loop with its existing mmugather.

Affected Software

2 affected componentsFixes available
linux/kernel>=5.16.0<6.18.64
6.18.64
linux/kernel>=6.19.0<7.3.5
7.3.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.64
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5

Frequently Asked Questions

1

What conditions are required to trigger the deadlock?

The issue requires an mremap operation involving PMD-sized hugetlb mappings where PMD sharing is possible. The move path must attempt to allocate or share a destination page table while it already holds the mapping's i_mmap_rwsem for write.

2

What is the operational impact?

The affected move path can deadlock because huge_pte_alloc() may invoke huge_pmd_share(), which attempts to acquire i_mmap_rwsem for read while the same path holds it for write. This can cause the mremap operation to stop making progress.

3

What changes in the resolved implementation?

For eligible PMD-sized hugetlb mappings, the move path no longer allocates or shares the destination page table. It zaps the source range and allows a later fault on the destination to populate or share the PMD lazily.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203