Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-93218 Overview
CVE-2026-93218 affects the Linux kernel memory management subsystem, specifically the transparent huge page (THP) handling path in mm/huge_memory. The flaw resides in madvise_free_huge_pmd(), which fails to correctly handle device-private page middle directory (PMD) entries. When a Heterogeneous Memory Management (HMM) based GPU driver races with a madvise(MADV_FREE) call, migrate_vma_pages() can flip the PMD to a device-private entry between the caller's pmd_trans_huge() check and the callee's acquisition of pmd_trans_huge_lock(). The resulting state transition leads the kernel into a code path that can call pmd_folio() on an entry that does not represent a folio.
Critical Impact
A race between HMM GPU drivers and MADV_FREE can drive the kernel into an unexpected code path on device-private PMDs, risking a kernel panic on affected systems.
Affected Products
- Linux kernel versions containing the madvise_free_huge_pmd() implementation prior to the fix
- Systems configured with CONFIG_ARCH_SUPPORTS_PMD_SOFTLEAF
- Hosts running HMM-based GPU drivers that use migrate_vma_pages()
Discovery Timeline
- 2026-09-24 - CVE-2026-93218 published to the National Vulnerability Database
- 2026-09-24 - Last updated in NVD database
Technical Details for CVE-2026-93218
Vulnerability Analysis
The vulnerability is a race condition [TOCTOU] in the Linux kernel's transparent huge page handling path. madvise_free_pte_range() performs an unlocked check with pmd_trans_huge(*pmd), then calls madvise_free_huge_pmd(), which acquires pmd_trans_huge_lock(). Between these two operations, the PMD state can change. Because pmd_is_huge() returns true for a device-private PMD, the variable orig_pmd can hold a device-private entry when the code enters the !pmd_present() branch. The function then proceeds toward pmd_folio() on an entry that does not back a folio.
An HMM-based GPU driver triggers this condition when migrate_vma_pages() installs a device-private PMD concurrently with a userspace madvise(MADV_FREE) call. The fix skips device-private PMDs in the non-present branch and jumps to out before pmd_folio() executes.
Root Cause
The root cause is incomplete classification of non-present PMD entries. The original logic assumed migration entries were the only non-present variant worth handling in the huge PMD free path. Device-private entries were not excluded, allowing orig_pmd to carry a device-private value into code that expects a folio-backed PMD. The prior thp_migration_supported() guard also suppressed cases where the warning would already be silent, so it was dropped in favor of a VM_WARN_ON_ONCE() check.
Attack Vector
Triggering the race requires local workload conditions that combine HMM GPU memory migration with madvise(MADV_FREE) on transparent huge pages. The vulnerability manifests as unexpected kernel behavior rather than a remotely reachable attack surface. See the upstream commits for the exact ordering and the folio-handling path involved: Kernel Git Commit 5e3026b and Kernel Git Commit ce579dc.
Detection Methods for CVE-2026-93218
Indicators of Compromise
- Kernel log entries containing VM_WARN_ON_ONCE originating from mm/huge_memory.c on hosts running HMM GPU drivers
- Kernel oops or panic traces referencing madvise_free_huge_pmd or pmd_folio
- Unexpected process termination on workloads that combine GPU memory migration with madvise(MADV_FREE)
Detection Strategies
- Inventory kernel versions across Linux endpoints and compare against the fixed commits 5e3026b and ce579dc
- Monitor dmesg and /var/log/kern.log for warnings in the transparent huge page free path
- Correlate GPU workload telemetry with kernel warning events to identify affected systems
Monitoring Recommendations
- Forward kernel ring buffer events to centralized logging for retrospective analysis
- Alert on repeated VM_WARN_ON_ONCE entries from huge_memory on the same host
- Track hosts running vendor GPU drivers that implement migrate_vma_pages()
How to Mitigate CVE-2026-93218
Immediate Actions Required
- Identify Linux hosts running HMM-capable GPU drivers that are built with CONFIG_ARCH_SUPPORTS_PMD_SOFTLEAF
- Apply the upstream stable kernel update containing commits 5e3026bf7364 and ce579dcf730c
- Reboot affected hosts after the kernel update to activate the patched memory management code
Patch Information
The fix skips device-private PMDs in the non-present branch of madvise_free_huge_pmd() and jumps to the out label before pmd_folio() runs. The patch also downgrades the type check to VM_WARN_ON_ONCE() and removes the redundant thp_migration_supported() guard. Review the upstream commits at Kernel Git Commit 5e3026b and Kernel Git Commit ce579dc.
Workarounds
- Where feasible, avoid madvise(MADV_FREE) on memory regions concurrently managed by HMM GPU drivers
- Disable transparent huge pages on affected hosts if GPU migration workloads cannot be isolated
- Restrict workloads that exercise migrate_vma_pages() to patched kernels only
# Temporarily disable transparent huge pages until the kernel is patched
echo never > /sys/kernel/mm/transparent_hugepage/enabled
# Verify the current kernel version against the fixed commits
uname -r
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

