CVE-2026-99649
mm/ksm: check large swap-cache folios before mapping them
What happened?
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.
Affected software and versions
| Software | Version information | Fixed version |
|---|---|---|
| LinuxLinux | affected: f1879e8a0c601de78a356016e216241b43de9208 to < cc4b71683ee9d8d4ed0b25c0744314005fb3e395; affected: f1879e8a0c601de78a356016e216241b43de9208 to < 7f2c000ffb1047b476cbf267f741272c389d3e31 | See vendor advisory |
| LinuxLinux | affected: 7.0; unaffected: 0 to < 7.0; unaffected: 7.3.5 to ≤ 7.3.*; unaffected: 7.4-rc2 to ≤ * | See vendor advisory |
Version information comes from the source record and can include unaffected products and exceptions. Distribution packages may contain backported fixes: an older upstream version alone does not prove a server is affected.
Is it being exploited?
This CVE was not listed in the CISA catalogue at our last retrieval. This does not establish that exploitation is absent.
How to respond
- Confirm the product, installed package version, and any configuration requirements in the vendor advisory.
- Follow the vendor’s remediation or workaround guidance in the references below. Structured fixed-version data is unavailable here; the publisher’s description may include a fix or workaround.
- Restart affected services if required, then verify the running version. Known exploitation may warrant investigation as well as patching.