CVE-2026-142879

Source
https://cve.org/CVERecord?id=CVE-2026-142879
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142879.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-142879
Downstream
Published
2026-12-03T03:23:35Z
Modified
2026-12-03T05:00:57Z
Summary
mm/migrate: snapshot the source nid before the misplaced migration
Details

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.

Database specific
{
    "cna_assigner":  "Linux",
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142879.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
e39bb6be9f2b39a6dbaeff484361de76021b175d
Fixed
4a843e3d55d194fb1e49fb85b579028e80392cec
Fixed
7643b5e6aabda50f5b3475b4917af157b4fe83d2
Fixed
f9a41150ec9720ea1b140f5fd0d8a3466560baae
Fixed
0dfdc739e124badfaeefa63dddde51ea7b6db214
Fixed
632853f04454fd1f424996070f636856796a8efb
Show 1 more event Show fewer events
Fixed
fe623a81ad9eddf10059b4e44bca0440d9120613

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142879.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
6.1.193
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.163
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.118
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.64
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.3.5

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142879.json"