Skip to content
DayZeroHub
High Not yet writtenCVSS 7.8CVE-2026-99650

CVE-2026-99650: mm/ksm: fix use of a freed anon_vma at swap-in

Linux Linux

Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.

Summary

CVE-2026-99650: high-severity vulnerability (CVSS 7.8) in Linux Linux.

What happened

Original description from the source: In the Linux kernel, the following vulnerability has been resolved: mm/ksm: fix use of a freed anon_vma at swap-in A folio read from a swap slot previously shared by KSM can remain in the swap cache after the process that first mapped it exits. Its anon_vma can then be freed, so ksm_might_need_to_copy() must not dereference it to compare roots. Doing so can result in some false-positives, resulting in the reverse mapping missing the new folio mapping, preventing migration and reclaim. SLAB_TYPESAFE_BY_RCU allows individual anon_vma objects to be reused immediately after freeing. A stale pointer can then refer to another anon_vma whose root matches, even though the target VMA is not linked to that anon_vma. Move the anonymous rmap compatibility checks into folio_anon_rmap_compatible(). Keep the page-index check and compare the folio's anon_vma pointer against the VMA's own anon_vma and root first. If neither matches, bite the bullet and walk the VMA's anon_vma_chain. The VMA keeps these anon_vmas alive, and finding a match guarantees that reverse mapping can find the new mapping. Lorenzo Stoakes says in a private discussion: "This isn't quite equivalent to the existing check. Every anon_vma in an anon_vma_chain shares the same root, but if you split a VMA then fork both of them like this: VMA A / \ <split> VMA B VMA C \ / root <- anon_vma 1 ----^ ^---- <fork> / parent \ anon_vma 2 anon_vma 3 | | VMA D VMA E VMA's D and E both get their own new anon_vma's such that: VMA D: anon_vma 2 -> anon_vma 1 -> root VMA E: anon_vma 3 -> anon_vma 1 -> root And if you found a folio referencing anon_vma 2, the existing check: anon_vma->root == vma->anon-vma->root Would be true for VMA's…

Why it matters

High severity, CVSS 7.8.

Affected products and versions

Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 74a05dab72662bd27ade63f6f44a2ea714815de7; Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea; Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e; Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < d25821a954382d13a5dd770ee5215729e8d274d7; Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < daa1e227f972f64a8468aa0101170fadb93ab552; Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 97ce258daffd374f5403641ca892f95e31769dbb; Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 85260730efefc48111603fa865d224bae1f5447a; Linux Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e; Linux Linux 2.6.36; Linux Linux < 2.6.36; Linux Linux 5.10.275 (fixed in 5.10.275); Linux Linux 5.15.226 (fixed in 5.15.226)

ProductVersionsFixed in
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 74a05dab72662bd27ade63f6f44a2ea714815de7—
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea—
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e—
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < d25821a954382d13a5dd770ee5215729e8d274d7—
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < daa1e227f972f64a8468aa0101170fadb93ab552—
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 97ce258daffd374f5403641ca892f95e31769dbb—
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 85260730efefc48111603fa865d224bae1f5447a—
Linux Linux>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e—
Linux Linux2.6.36—
Linux Linux< 2.6.36—
Linux Linux5.10.2755.10.275
Linux Linux5.15.2265.15.226
Linux Linux6.1.1936.1.193
Linux Linux6.6.1636.6.163
Linux Linux6.12.1196.12.119
Linux Linux6.18.656.18.65
Linux Linux7.3.57.3.5
Linux Linux7.4-rc27.4-rc2

Action recommended by the source

Upgrade to a fixed version: 5.10.275, 5.15.226, 6.1.193, 6.12.119, 6.18.65, 6.6.163, 7.3.5, 7.4-rc2.

Fixed in: 5.10.275, 5.15.226, 6.1.193, 6.12.119, 6.18.65, 6.6.163, 7.3.5, 7.4-rc2

Information taken from the source or the vendor. Verify it at the original link before acting.

Sources and references

Relevant change history

  1. Published

    Preliminary advisory published.