# CVE-2026-99650: mm/ksm: fix use of a freed anon\_vma at swap-in

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-28)
- **Published:** 2026-11-20T05:50:03.838Z
- **Modified:** 2026-11-23T08:18:05.927Z

## Who should check

- Anyone running Linux \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 74a05dab72662bd27ade63f6f44a2ea714815de7; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< d25821a954382d13a5dd770ee5215729e8d274d7; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< daa1e227f972f64a8468aa0101170fadb93ab552; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 97ce258daffd374f5403641ca892f95e31769dbb; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 85260730efefc48111603fa865d224bae1f5447a; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e
- Anyone running Linux 2.6.36

## Description

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 B, C, D & E.

  However after your change it'd be true for VMA D only, as it's the only
  one with anon\_vma 2 in its anon\_vma\_chain.

  Whether or not that could actually happen in practice... 🙂 I don't
  know.

  \[...\] after your change it'd be true for VMA D only, as it's the only
  one with anon\_vma 2 in its anon\_vma\_chain. \[...\] I would \[...\] say that
  you are making the test stricter but more correct.
"

If this affects performance when KSM was never even involved, we could
just track whether KSM ever merged anything and just skip these checks.

There isn't really a lot we can do otherwise: for mapped folios we might
be able to use folio\_get\_anon\_vma(), but for unmapped folios there really
is no easy way to see if the anon\_vma is still valid.

Document the (confusing) lifetime requirements of folio\_anon\_vma().

## Affected and fixed versions

- Linux: \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 74a05dab72662bd27ade63f6f44a2ea714815de7; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< d25821a954382d13a5dd770ee5215729e8d274d7; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< daa1e227f972f64a8468aa0101170fadb93ab552; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 97ce258daffd374f5403641ca892f95e31769dbb; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 85260730efefc48111603fa865d224bae1f5447a; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e (cvelist)
- Linux: 2.6.36 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-99650. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-99650.md
Affected: Linux >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 74a05dab72662bd27ade63f6f44a2ea714815de7; >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea; >= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, < 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e; >= ba6f0ff3981e6263ab81ac5…
Fixed in: Linux 74a05dab72662bd27ade63f6f44a2ea714815de7, Linux 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea, Linux 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e, Linux 97ce258daffd374f5403641ca892f95e31769dbb, Linux 85260730efefc48111603fa865d224bae1f5447a, Linux 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-99650 being exploited?

There is no confirmed exploitation: CVE-2026-99650 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-99650?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-99650?

Linux \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 74a05dab72662bd27ade63f6f44a2ea714815de7; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< d25821a954382d13a5dd770ee5215729e8d274d7; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< daa1e227f972f64a8468aa0101170fadb93ab552; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 97ce258daffd374f5403641ca892f95e31769dbb; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 85260730efefc48111603fa865d224bae1f5447a; \>= ba6f0ff3981e6263ab81ac512f04cca55b85ec81, \< 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e; Linux 2.6.36.

### Is there a fix for CVE-2026-99650?

Yes. Fixed in Linux 74a05dab72662bd27ade63f6f44a2ea714815de7, Linux 27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea, Linux 21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e, Linux 97ce258daffd374f5403641ca892f95e31769dbb, Linux 85260730efefc48111603fa865d224bae1f5447a, Linux 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e. Upgrade Linux to 4c2dec1dce368ad9e9b1814307cb5ef3832fa07e or later.

### How do I check if I'm affected by CVE-2026-99650?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/74a05dab72662bd27ade63f6f44a2ea714815de7>
- other: <https://git.kernel.org/stable/c/27e31a508e4f21f2e1bbb54f8994b235fd3ee2ea>
- other: <https://git.kernel.org/stable/c/21cc8f704b6aed33175ae22a4c467c5e8e2bdd9e>
- other: <https://git.kernel.org/stable/c/d25821a954382d13a5dd770ee5215729e8d274d7>
- other: <https://git.kernel.org/stable/c/daa1e227f972f64a8468aa0101170fadb93ab552>
- other: <https://git.kernel.org/stable/c/97ce258daffd374f5403641ca892f95e31769dbb>
- other: <https://git.kernel.org/stable/c/85260730efefc48111603fa865d224bae1f5447a>
- other: <https://git.kernel.org/stable/c/4c2dec1dce368ad9e9b1814307cb5ef3832fa07e>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-99650>
- FIRST EPSS: EPSS scores by FIRST <https://www.first.org/epss/>

HTML: <https://flawdb.com/CVE-2026-99650> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-99650>
