{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "e39bb6be9f2b39a6dbaeff484361de76021b175d"
            },
            {
              "fixed": "4a843e3d55d194fb1e49fb85b579028e80392cec"
            },
            {
              "fixed": "7643b5e6aabda50f5b3475b4917af157b4fe83d2"
            },
            {
              "fixed": "f9a41150ec9720ea1b140f5fd0d8a3466560baae"
            },
            {
              "fixed": "0dfdc739e124badfaeefa63dddde51ea7b6db214"
            },
            {
              "fixed": "632853f04454fd1f424996070f636856796a8efb"
            },
            {
              "fixed": "fe623a81ad9eddf10059b4e44bca0440d9120613"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "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"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142879.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/migrate: snapshot the source nid before the misplaced migration\n\nA successful migration frees the source folio before the promotion\ncounter update, so the folio_nid() read there operates on a freed\nfolio — which may already have been reallocated. It happens to work\ntoday, as Zi explained:\n\n  : Strictly speaking, it can be seen as a benign UAF. It works, because\n  : 1. folio-\u003eflags happens to be the same as page-\u003eflags,\n  : 2. folio/page nid is stored in the -\u003eflags and never changed.\n  :\n  : In memdesc world, after a folio is freed, I assume folio-\u003eflags would be\n  : zeroed since struct folio is freed and calling folio_nid() on a freed\n  : folio would give a bogus result (yeah, it can be mitigated by not\n  : zeroing node field and each node has its own struct folio pool, but that\n  : makes folio_nid() implementation dependent).\n\nand Matthew explained further:\n\n  : once struct folio is separately allocated, it's a UAF.  It could be\n  : recycled to a different NID or maybe the slab containing the folio could\n  : be freed (assuming we're not holding the RCU read lock at this point in\n  : migration, and I don't see why we would be).\n\nA separate concern is memory hot-removal.  With memory-tiering mode\nenabled, successful migration can release the source before the\npromotion-accounting folio_nid() read.  If the task is preempted there,\nan otherwise-free source block can be offlined and removed first.  On\nthe x86 path, removal can unmap the source's vmemmap, so the later read\ncan fault.  The snapshot avoids that read.",
  "id": "CVE-2026-142879",
  "modified": "2026-12-03T04:46:07.775984238Z",
  "published": "2026-12-03T03:23:35.948Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/0dfdc739e124badfaeefa63dddde51ea7b6db214"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/4a843e3d55d194fb1e49fb85b579028e80392cec"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/632853f04454fd1f424996070f636856796a8efb"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7643b5e6aabda50f5b3475b4917af157b4fe83d2"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/f9a41150ec9720ea1b140f5fd0d8a3466560baae"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/fe623a81ad9eddf10059b4e44bca0440d9120613"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142879.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142879"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "mm/migrate: snapshot the source nid before the misplaced migration"
}