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

x86/mm/pat: Acquire init_mm write lock on collapse to avoid UAF

x86 implements page attribute modification using its Change Page
Attributes (CPA) mechanism.

This tracks properties of ranges such as cache mode through x86 page
attributes, and as part of that logic manipulates kernel page tables.

Since commit:

41d88484c71c ("x86/mm/pat: restore large ROX pages after fragmentation")

ranges of kernel page table entries can be collapsed into
huge page table entries as part of this logic.

As part of this collapse, it frees the page tables which the collapsed
entries previously pointed to, and it does so without any relevant locks
being held to preclude concurrent kernel page table walkers.

The only way this code can be reached is if CPA_COLLAPSE is specified, and
this is only set in set_memory_rox() via:

set_memory_rox()
-> change_page_attr_set_clr()
-> cpa_flush()
-> cpa_collapse_large_pages()

Notable users of this are execmem and BPF when manipulating executable
mappings.

However, this is problematic for ptdump as it walks ranges it does not own
and thus runs the risk of a use-after-free on page tables freed underneath
it.

In addition, concurrent CPA collapse operations are possible which can also
cause races.

Resolve the issue by acquiring the mmap write lock on init_mm across the
whole operation.

It is safe to acquire a sleeping lock as all the callers invoke
set_memory_rox() from process context and in any case,
change_page_attr_set_clr() calls vm_unmap_alias() which ultimately takes a
mutex, disallowing atomic context here.
Published: 2026-09-25
Score: n/a
EPSS: n/a
KEV: No
Impact: Use-after-free in kernel memory management enabling memory corruption and potential privilege escalation
Action: Immediate Patch
AI Analysis

Impact

The vulnerability arises when the x86 Change Page Attributes (CPA) mechanism collapses ranges of kernel page table entries into huge page entries. During this collapse the freed page tables are released without protecting them with the appropriate lock. If a kernel page table walker such as ptdump traverses these tables concurrently, a use‑after‑free is triggered. The flaw is exercised only when CPA_COLLAPSE is active, which occurs in set_memory_rox() called by execmem and BPF code that changes executable memory mappings. The result is a kernel memory corruption that could crash the system or be exploited to execute arbitrary code with kernel privileges.

Affected Systems

All Linux kernel variants prior to the patch that incorporates commit 41d88484c71c. The vendor list is generic Linux kernel; no specific versions are enumerated in the input. Any kernel that includes the unprotected page table collapse logic is affected.

Risk and Exploitability

The flaw is a classic use‑after‑free and could allow a local attacker who can trigger set_memory_rox() (for example by loading a malicious BPF program or using execmem) to corrupt kernel memory. The EPSS score is not available and the vulnerability is not listed in CISA’s KEV catalog. Because the code runs in process context, the attack requires user‑space execution but privileges are typically elevated by kernel mechanisms such as BPF helper calls, therefore the risk is non‑trivial. Exploitation would likely involve a race condition between page table collapse and page table traversal, making the likelihood moderate in the absence of precise timing. The CVSS score is not supplied, but the presence of a UAF in the kernel typically translates to a high‑severity rating.

Generated by OpenCVE AI on September 25, 2026 at 13:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a release that contains commit 41d88484c71c or later to eliminate the unprotected page table collapse.
  • If a recent kernel release is not yet available, rebuild a custom kernel including the fix commit and install it as a temporary patch.
  • Until the patch is applied, limit the use of tools that invoke set_memory_rox(), such as BPF program loading or execmem, to trusted users and consider disabling these features if they are not required.

Generated by OpenCVE AI on September 25, 2026 at 13:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 25 Sep 2026 14:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-415

Fri, 25 Sep 2026 10:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: x86/mm/pat: Acquire init_mm write lock on collapse to avoid UAF x86 implements page attribute modification using its Change Page Attributes (CPA) mechanism. This tracks properties of ranges such as cache mode through x86 page attributes, and as part of that logic manipulates kernel page tables. Since commit: 41d88484c71c ("x86/mm/pat: restore large ROX pages after fragmentation") ranges of kernel page table entries can be collapsed into huge page table entries as part of this logic. As part of this collapse, it frees the page tables which the collapsed entries previously pointed to, and it does so without any relevant locks being held to preclude concurrent kernel page table walkers. The only way this code can be reached is if CPA_COLLAPSE is specified, and this is only set in set_memory_rox() via: set_memory_rox() -> change_page_attr_set_clr() -> cpa_flush() -> cpa_collapse_large_pages() Notable users of this are execmem and BPF when manipulating executable mappings. However, this is problematic for ptdump as it walks ranges it does not own and thus runs the risk of a use-after-free on page tables freed underneath it. In addition, concurrent CPA collapse operations are possible which can also cause races. Resolve the issue by acquiring the mmap write lock on init_mm across the whole operation. It is safe to acquire a sleeping lock as all the callers invoke set_memory_rox() from process context and in any case, change_page_attr_set_clr() calls vm_unmap_alias() which ultimately takes a mutex, disallowing atomic context here.
Title x86/mm/pat: Acquire init_mm write lock on collapse to avoid UAF
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-25T10:22:54.787Z

Reserved: 2026-09-25T10:18:58.204Z

Link: CVE-2026-97943

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-25T11:17:21.750

Modified: 2026-09-25T11:17:21.750

Link: CVE-2026-97943

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-25T14:00:13Z

Weaknesses