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-97943 Overview
CVE-2026-97943 is a use-after-free vulnerability in the Linux kernel's x86 memory management subsystem. The flaw resides in the Change Page Attributes (CPA) mechanism used for modifying kernel page attributes such as cache mode and execute permissions. During the large page collapse operation introduced to restore read-only executable (ROX) pages after fragmentation, the kernel frees intermediate page tables without holding any lock that would exclude concurrent walkers. A concurrent page table dump (ptdump) or another CPA collapse can access the freed memory, leading to use-after-free conditions and race windows on init_mm kernel page tables.
Critical Impact
Concurrent kernel page table walkers can access freed page tables during CPA large-page collapse, causing use-after-free on init_mm and potential kernel instability.
Affected Products
- Linux kernel versions containing commit 41d88484c71c ("x86/mm/pat: restore large ROX pages after fragmentation")
- x86 and x86_64 architectures using the Change Page Attributes (CPA) mechanism
- Systems using execmem or BPF subsystems that manipulate executable mappings via set_memory_rox()
Discovery Timeline
- 2026-09-25 - CVE-2026-97943 published to the National Vulnerability Database
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97943
Vulnerability Analysis
The Linux kernel's x86 architecture implements page attribute modification through the Change Page Attributes (CPA) mechanism. CPA manages properties such as cache mode and executable permissions on kernel page table entries. Starting with commit 41d88484c71c, the CPA code began collapsing ranges of smaller kernel page table entries into huge page entries to restore ROX pages after fragmentation.
During the collapse operation, the kernel frees the intermediate page tables that the collapsed entries previously referenced. The collapse path performs this free without acquiring any lock that would synchronize with concurrent kernel page table walkers. This creates a window in which another kernel path can walk and dereference page tables that have already been freed.
Root Cause
The root cause is missing synchronization on init_mm during cpa_collapse_large_pages(). The collapse code path, reachable through set_memory_rox() → change_page_attr_set_clr() → cpa_flush() → cpa_collapse_large_pages(), releases page tables without holding the init_mm mmap write lock. Kernel subsystems such as ptdump traverse init_mm page tables that they do not own, and concurrent CPA collapse operations on separate CPUs can also race with one another, producing use-after-free conditions [CWE-416].
Attack Vector
The code path is triggered when callers invoke set_memory_rox() with CPA_COLLAPSE set. Primary callers include execmem and the BPF subsystem when installing executable mappings such as JIT-compiled BPF programs. Concurrent execution of ptdump (for example, through debugfs page table inspection) or another collapse operation can dereference freed page tables. Exploitation requires local kernel-level activity capable of triggering CPA collapse concurrent with a page table walk; the issue is primarily a kernel stability and memory safety defect rather than a direct remote attack surface.
Technical references are available in the upstream commits: Kernel Git Commit Change, Kernel Git Commit Update, and Kernel Git Commit Fix.
Detection Methods for CVE-2026-97943
Indicators of Compromise
- Unexpected kernel oops, general protection faults, or page faults originating in cpa_collapse_large_pages(), ptdump_walk_pgd(), or related x86 memory management functions.
- KASAN (Kernel Address Sanitizer) reports flagging use-after-free on page table pages in init_mm walks.
- Kernel panics correlated with BPF program loading, execmem allocation, or debugfs page table dump activity.
Detection Strategies
- Enable CONFIG_KASAN in test or canary kernels to identify use-after-free on page table pages during CPA operations.
- Correlate kernel crash telemetry with workloads that heavily use BPF JIT or execmem, particularly on long-running hosts where ROX fragmentation accumulates.
- Audit kernel versions deployed across the fleet against the fixed upstream commits to identify systems still carrying the vulnerable code path.
Monitoring Recommendations
- Ingest /var/log/kern.log and dmesg into a centralized log pipeline and alert on stack traces referencing cpa_collapse_large_pages, __cpa_process_fault, or ptdump.
- Monitor BPF program load events and executable memory allocations alongside kernel crash events to correlate triggers.
- Track kernel package versions on Linux endpoints to identify hosts missing the upstream fix.
How to Mitigate CVE-2026-97943
Immediate Actions Required
- Apply the upstream Linux kernel patch acquiring the init_mm mmap write lock across cpa_collapse_large_pages().
- Update to a stable kernel release that incorporates the fixing commits referenced in the kernel.org advisories.
- Prioritize patching on hosts that run BPF-heavy workloads, loadable executable modules via execmem, or expose debugfs page table dump interfaces.
Patch Information
The fix acquires the mmap write lock on init_mm for the duration of the CPA collapse operation, serializing it against concurrent kernel page table walkers and other collapse operations. Taking a sleeping lock is safe because all callers invoke set_memory_rox() from process context, and change_page_attr_set_clr() already calls vm_unmap_alias(), which takes a mutex. The upstream fix is distributed across commits 35820cf8dd52, 93b98882198b, and a1c7570cedd0 in the stable kernel tree.
Workarounds
- Restrict access to /sys/kernel/debug/page_tables and other debugfs interfaces that invoke ptdump on init_mm.
- Limit which users and processes can load BPF programs by enforcing kernel.unprivileged_bpf_disabled=1 and tightening CAP_BPF/CAP_SYS_ADMIN assignments.
- Reduce reliance on dynamic execmem allocations where feasible until kernels are patched.
# Disable unprivileged BPF to reduce exposure to the CPA collapse path
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' >> /etc/sysctl.d/99-cve-2026-97943.conf
# Restrict debugfs access (ptdump) to root only
mount -o remount,mode=700 /sys/kernel/debug
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

