HIGH
x86/mm SplitPage UAF
CVE-2026-97525
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
KernelScan AI6.0MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: x86/mm/pat: Allocate split page tables as kernel page tables A PTE is allocated directly without going through the standard page table allocation routines (such as pte_alloc_one_kernel()) when the CPA code splits a large page (__split_large_page()). This means the page table constructor is never called nor is the page table marked as a kernel page table. The former results in the folio associated with the page table not being marked as a page table (__pagetable_ctor() is never called thus neither is __folio_set_pgtable()) nor are statistics updated to reflect it (lruvec_stat_add_folio() is never called). The latter issue of failing to mark the page table as a kernel page table (ptdesc_set_kernel() is never called) is far more problematic. Since commit: 5ba2f0a15564 ("mm: introduce deferred freeing for kernel page tables") kernel page table freeing has been batched and since the subsequent commit: e37d5a2d60a3 ("iommu/sva: invalidate stale IOTLB entries for kernel address space") IOTLB cache entries for kernel page tables have been invalidated upon being freed. Since split page tables are freed without this invalidation, the IOTLB can contain stale entries for them. Resolve the issue by using the ordinary PTE allocation API at split time. This results in these kernel page tables invoking a page table constructor, and thus requires a page table destructor. Destructors are not always present, like for early allocated direct map page tables). Conditionally call pagetable_dtor_free() if the PG_table folio flag for the ptdesc is set, otherwise we free the page table via pagetable_free(). Regardless of which path is taken page tables marked as kernel page tables, which now includes split page tables, take the correct route through pagetable_free_kernel(). There is a user-visible side effect in that split page tables will appear in nr_page_table_pages in /proc/vmstat (as do other kernel page tables allocated after early boot), however this is a positive change. This issue started being markedly problematic after commit: 5ba2f0a15564 ("mm: introduce deferred freeing for kernel page tables") so choose this as the Fixes target. [ dhansen: rephrase in imperative mood ]
02KernelScan AI Analysis
Risk summary
Systems with IOMMU/SVA hardware and CONFIG_ASYNC_KERNEL_PGTABLE_FREE enabled are at risk. Stale IOTLB entries for freed kernel page tables can lead to use-after-free conditions where an IOMMU device accesses freed and potentially reused memory, causing information disclosure or data corruption.
Vulnerability analysis
When the kernel's page attribute change logic splits a large page into smaller page tables, the new page table is allocated outside the standard kernel page table allocation path, so it is never marked as a kernel page table. When these page tables are later freed, the IOMMU's IOTLB cache entries for them are not invalidated, leaving stale entries that reference freed memory. If that memory is reused, an IOMMU device could translate addresses through the old page table entries, potentially accessing or corrupting unrelated memory. The fix changes the allocation to use the standard kernel page table allocation path so the page table is properly constructed and marked as a kernel page table, and updates the free path to invoke the correct invalidation and destructor handling. This issue is reachable on local systems with IOMMU/SVA hardware and the relevant kernel configuration enabled, and page splitting is triggered by privileged kernel operations.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.18.7 | 6.18.53 | 84e0cd79d57f |
| 7.2 | — | 7.2.7 | 922873cf4fc3 |
| mainline | — | 7.3-rc4 | 9e4a3ec3411b |