AZL-115561: CVE-2026-99703 affecting package kernel 6.6.161.1-1
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.