CVE-2026-99649 in Linuxinfo

Summary

by MITRE • 11/20/2026

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

mm/ksm: check large swap-cache folios before mapping them

KSM folios are always small, but their shared swap slots can be read back as part of a large folio in the swap cache. ksm_might_need_to_copy() skips large folios, so another process can map a page with an incompatible anon_vma or page index. Reverse mapping then cannot find the new mapping, preventing migration or reclaim.

Apply the same compatibility checks to large folios as to small ones. Pass the page corresponding to the swap entry and copy only that page when necessary. In do_swap_page()'s copy path, decrement only that slot's swap count, because the source swap-cache folio can now be large.

Fix generated by an LLM and sent by Chris Mason in private.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel memory management subsystem contains a vulnerability within the Kernel Samepage Merging (KSM) mechanism related to how shared swap slots are handled when mapped back into memory as part of larger folios. KSM is designed to identify identical pages across different processes and merge them to save physical memory, typically operating on small standard-sized page units. However, during the process of reading these shared swap slots from the swap cache, the kernel may encounter large folios that encompass multiple smaller pages. The existing logic in ksm_might_need_to_copy() incorrectly skips these large folios under the assumption that KSM only deals with small folios. This oversight creates a scenario where another process can map a page associated with an incompatible anon_vma or page index, leading to inconsistencies in memory management structures.

This technical flaw results in significant operational impacts on system stability and resource efficiency. When an incompatible mapping occurs due to the skipped checks, reverse mapping mechanisms fail to locate the new mapping correctly. This failure prevents critical kernel operations such as memory migration and reclaim from proceeding successfully. Memory migration is essential for balancing load across NUMA nodes or moving pages during live updates, while page reclaim is vital for freeing up physical memory when system resources are constrained. The inability to perform these tasks can lead to increased memory pressure, potential performance degradation, and in severe cases, system instability or hangs due to the kernel's inability to manage its memory footprint effectively.

To resolve this issue, the fix applies the same compatibility checks used for small folios to large folios as well. This ensures that any page being mapped from a swap slot undergoes rigorous validation before integration into the process address space. The solution involves passing the specific page corresponding to the swap entry and copying only that individual page when necessary, rather than treating the entire large folio uniformly. Additionally, in do_swap_page()'s copy path, the implementation decrements only the swap count for the specific slot involved. This granular approach acknowledges that the source swap-cache folio can now be large, ensuring accurate accounting of resource usage and preventing reference counting errors that could lead to memory leaks or premature freeing of shared resources.

From a security and standards perspective, this vulnerability aligns with CWE-20 Improper Input Validation, as the kernel failed to adequately validate the compatibility of mapped pages before allowing them into active use. It also relates to CWE-416 Use After Free in broader contexts where improper reference counting or mapping can lead to undefined behavior, although here it primarily manifests as a functional failure rather than direct exploitation for code execution. In terms of MITRE ATT&CK, this flaw could potentially be leveraged within the Defense Evasion category under techniques that involve manipulating memory management to avoid detection or disrupt system availability, specifically impacting Availability through resource exhaustion or denial of service conditions caused by failed reclaim operations. Mitigation involves applying the kernel patch that enforces consistent compatibility checks across all folio sizes and ensures precise swap count decrementing during page copy operations. System administrators should ensure their Linux kernels are updated with this fix to maintain robust memory management integrity and prevent potential stability issues arising from KSM interactions with large folios in swap cache scenarios.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00156

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!