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: 7.0 High
EPSS: < 1% Very Low
KEV: No
Impact: Use‑after‑free leading to kernel memory corruption
Action: Immediate Patch
AI Analysis

Impact

The vulnerability originates in the x86 Change Page Attributes mechanism where page tables are collapsed into huge entries without holding the appropriate lock. This releases page tables that may still be referenced by page‑table walkers such as ptdump, leading to a use‑after‑free in kernel memory. Based on the description, it is inferred that an unintended memory corruption could occur, potentially resulting in a kernel‑space fault; the extent to which this could enable privilege escalation is not explicitly documented.

Affected Systems

Affected systems include all Linux kernel releases that incorporate the unprotected CPA collapse logic before the patch that adds commit 41d88484c71c. The flaw is triggered by set_memory_rox(), which is used by execmem and BPF when adjusting executable memory mappings. Therefore any working kernel that supports those subsystems and does not include the commit is susceptible.

Risk and Exploitability

The CVSS score of 7.0 indicates high severity, while the EPSS score of less than 1 % suggests low probability of exploitation in the wild. The vulnerability is not in the CISA KEV catalog. Exploitation would likely require a local user to invoke set_memory_rox(), potentially through a malicious BPF program or execmem usage, and to trigger a race condition where page‑table collapse occurs concurrently with a walker. Based on the description, it is inferred that an attacker would need to time the collapse and walk to cause the use‑after‑free, making the attack non‑trivial but possible.

Generated by OpenCVE AI on October 1, 2026 at 08:37 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the patch from commit 41d88484c71c.
  • If a stable release is not available, rebuild and install a custom kernel that contains the commit.
  • Restrict the use of execmem and BPF features to trusted users or disable them if not required until the kernel is patched.

Generated by OpenCVE AI on October 1, 2026 at 08:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 01 Oct 2026 07:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-415

Wed, 30 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-413
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate


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-10-19T09:11:09.731Z

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-10-19T10:17:45.520

Link: CVE-2026-97943

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-25T00:00:00Z

Links: CVE-2026-97943 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-01T08:45:03Z

Weaknesses
  • CWE-413

    Improper Resource Locking