# CVE-2026-142879: mm/migrate: snapshot the source nid before the misplaced migration

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-12-03T03:23:35.948Z
- **Modified:** 2026-12-03T04:18:26.230Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker with local access could trigger a use-after-free in the Linux kernel memory migration code by reading the node ID of a freed folio during promotion accounting.

## Who should check

- Anyone running Linux \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 4a843e3d55d194fb1e49fb85b579028e80392cec; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 7643b5e6aabda50f5b3475b4917af157b4fe83d2; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< f9a41150ec9720ea1b140f5fd0d8a3466560baae; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 0dfdc739e124badfaeefa63dddde51ea7b6db214; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 632853f04454fd1f424996070f636856796a8efb; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< fe623a81ad9eddf10059b4e44bca0440d9120613
- Anyone running Linux 5.18

## Description

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

mm/migrate: snapshot the source nid before the misplaced migration

A successful migration frees the source folio before the promotion
counter update, so the folio\_nid() read there operates on a freed
folio — which may already have been reallocated. It happens to work
today, as Zi explained:

  : Strictly speaking, it can be seen as a benign UAF. It works, because
  : 1. folio-\>flags happens to be the same as page-\>flags,
  : 2. folio/page nid is stored in the -\>flags and never changed.
  :
  : In memdesc world, after a folio is freed, I assume folio-\>flags would be
  : zeroed since struct folio is freed and calling folio\_nid() on a freed
  : folio would give a bogus result (yeah, it can be mitigated by not
  : zeroing node field and each node has its own struct folio pool, but that
  : makes folio\_nid() implementation dependent).

and Matthew explained further:

  : once struct folio is separately allocated, it's a UAF.  It could be
  : recycled to a different NID or maybe the slab containing the folio could
  : be freed (assuming we're not holding the RCU read lock at this point in
  : migration, and I don't see why we would be).

A separate concern is memory hot-removal.  With memory-tiering mode
enabled, successful migration can release the source before the
promotion-accounting folio\_nid() read.  If the task is preempted there,
an otherwise-free source block can be offlined and removed first.  On
the x86 path, removal can unmap the source's vmemmap, so the later read
can fault.  The snapshot avoids that read.

## Affected and fixed versions

- Linux: \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 4a843e3d55d194fb1e49fb85b579028e80392cec; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 7643b5e6aabda50f5b3475b4917af157b4fe83d2; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< f9a41150ec9720ea1b140f5fd0d8a3466560baae; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 0dfdc739e124badfaeefa63dddde51ea7b6db214; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 632853f04454fd1f424996070f636856796a8efb; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< fe623a81ad9eddf10059b4e44bca0440d9120613 (cvelist)
- Linux: 5.18 (cvelist)

## Technologies

Linux kernel

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-142879.md
Affected: Linux >= e39bb6be9f2b39a6dbaeff484361de76021b175d, < 4a843e3d55d194fb1e49fb85b579028e80392cec; >= e39bb6be9f2b39a6dbaeff484361de76021b175d, < 7643b5e6aabda50f5b3475b4917af157b4fe83d2; >= e39bb6be9f2b39a6dbaeff484361de76021b175d, < f9a41150ec9720ea1b140f5fd0d8a3466560baae; >= e39bb6be9f2b39a6dbaeff4…
Fixed in: Linux 4a843e3d55d194fb1e49fb85b579028e80392cec, Linux 7643b5e6aabda50f5b3475b4917af157b4fe83d2, Linux 0dfdc739e124badfaeefa63dddde51ea7b6db214, Linux 632853f04454fd1f424996070f636856796a8efb

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-142879 being exploited?

There is no confirmed exploitation: CVE-2026-142879 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

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

It has no CVSS score yet. Unknown.

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

Linux \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 4a843e3d55d194fb1e49fb85b579028e80392cec; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 7643b5e6aabda50f5b3475b4917af157b4fe83d2; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< f9a41150ec9720ea1b140f5fd0d8a3466560baae; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 0dfdc739e124badfaeefa63dddde51ea7b6db214; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< 632853f04454fd1f424996070f636856796a8efb; \>= e39bb6be9f2b39a6dbaeff484361de76021b175d, \< fe623a81ad9eddf10059b4e44bca0440d9120613; Linux 5.18.

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

Yes. Fixed in Linux 4a843e3d55d194fb1e49fb85b579028e80392cec, Linux 7643b5e6aabda50f5b3475b4917af157b4fe83d2, Linux 0dfdc739e124badfaeefa63dddde51ea7b6db214, Linux 632853f04454fd1f424996070f636856796a8efb. No fix listed yet: follow the vendor advisory.

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

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/4a843e3d55d194fb1e49fb85b579028e80392cec>
- other: <https://git.kernel.org/stable/c/7643b5e6aabda50f5b3475b4917af157b4fe83d2>
- other: <https://git.kernel.org/stable/c/f9a41150ec9720ea1b140f5fd0d8a3466560baae>
- other: <https://git.kernel.org/stable/c/0dfdc739e124badfaeefa63dddde51ea7b6db214>
- other: <https://git.kernel.org/stable/c/632853f04454fd1f424996070f636856796a8efb>
- other: <https://git.kernel.org/stable/c/fe623a81ad9eddf10059b4e44bca0440d9120613>

## 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-142879>

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