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

Published Nov 20, 2026
·
Updated

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. ksmmightneedtocopy() skips large folios, so another process can map a page with an incompatible anonvma 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 doswappage()'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.

Affected Software

3 affected componentsFixes available
linux/kernel>=7.0.0<7.3.5
7.3.5
debian/linux*
debian/linux<=7.3.4-1
6.1.176-16.1.192-26.12.107-16.12.117-17.3.5-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.5
  2. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.5-1
  3. Compensating control

    In KSM's do_swap_page() copy path, apply the same compatibility checks to large swap-cache folios as to small ones. Pass the page corresponding to the swap entry to ksm_might_need_to_copy(), copy only that page when necessary, and decrement only that swap slot's count.

Event History

Nov 20, 2026
CVE Published
via MITRE·05:50 AM
Data Sourced
via MITRE·05:50 AM
Description
Data Sourced
via OSV·05:50 AM
DescriptionAffected Software
Data Sourced
via NVD·06:17 AM
Description

Frequently Asked Questions

1

What conditions are required for this issue to occur?

The issue requires KSM-managed pages whose shared swap slots are later read back as part of a large folio in the swap cache. A process must then map a page whose anonymous-VMA association or page index is incompatible with the existing mapping.

2

What is the operational impact if the system is affected?

Reverse mapping may be unable to locate the new mapping. This can prevent memory migration or reclaim for the affected pages.

3

Are systems using KSM but not large swap-cache folios affected?

The described failure depends on shared KSM swap slots being read back within a large swap-cache folio. The provided information does not indicate the same issue when the relevant swap-cache folio remains small.

4

What does the fix change?

The fix applies compatibility checks to large swap-cache folios as well as small ones. When copying is needed, it copies only the page for the relevant swap entry and decrements the swap count only for that slot.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203