GHSA-P9WX-P2FH-698J
Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32In the Linux kernel, the following vulnerability has been resolved:
mm/mempolicy: use vm_normal_folio_pmd() in queue_folios_pmd()
Patch series "mm: stop calling pmd_folio() on special PMDs", v3.
Two page table walkers resolve the folio behind a PMD with pmd_folio(), which is only valid for a PMD mapping a refcounted struct page:
madvise_cold_or_pageout_pte_range() mm/madvise.c queue_folios_pmd() mm/mempolicy.c
vmf_insert_pfn_pmd() installs special PMDs holding a raw pfn that need not have a memmap entry at all. Both walkers can reach one and fault on the first folio field read. The PTE halves of both already use vm_normal_folio(); these two patches make the PMD halves match.
The four callers of vmf_insert_pfn_pmd(), and which walker each reaches:
drivers/vfio/pci/vfio_pci_core.c VM_PFNMAP mempolicy drivers/gpu/drm/drm_gem_shmem_helper.c VM_PFNMAP mempolicy drivers/gpu/drm/panthor/panthor_gem.c VM_PFNMAP mempolicy drivers/hv/mshv_vtl_main.c VM_MIXEDMAP both
can_madv_lru_vma() rejects VM_PFNMAP, so only mshv_vtl_low reaches the madvise walker, and that needs CAP_SYS_ADMIN. queue_pages_walk_ops supplies its own ->test_walk, so walk_page_test()'s generic VM_PFNMAP skip never runs and vfio-pci is reachable by any process holding the device fd. Hence the different stable tags.
One behaviour change: mbind(MPOL_MF_STRICT) over a PMD mapped VM_PFNMAP region now returns 0 rather than -EIO. The PTE loop already returned 0 there. drm_gem_shmem and panthor are where this is observable, since they PMD map pages that do have a memmap entry and so never faulted.
Reproducer
No hardware needed. An out of tree module stands in for the drivers above: three misc devices, each with a ->huge_fault calling vmf_insert_pfn_pmd(), plus VM_HUGEPAGE so the fault path takes the PMD branch.
/dev/pmdspec_mixed VM_MIXEDMAP, pfn at the 1 TiB mark, no memmap /dev/pmdspec_pfnmap VM_PFNMAP, pfn at the 1 TiB mark, no memmap /dev/pmdspec_real VM_PFNMAP, real alloc_pages(PMD_ORDER) on node 0
Userspace maps the device into a PMD aligned window, reads one byte to fault the PMD in, checks a module parameter to confirm it went in, then issues the operation.
vng --run --user root --memory 4G --verbose \ --append "numa=fake=2" \ --exec "insmod pmdspec.ko && ./pmdspec_test "
numa=fake=2 gives a node 1 to bind to; the module allocates its real page on node 0, which is what makes queue_folio_required() true.
subtest operation parent series
madv_cold madvise(MADV_COLD) oops ret=0 madv_pageout madvise(MADV_PAGEOUT) oops ret=0 mbind_mixed mbind(MPOL_BIND, n1, MPOL_MF_MOVE) oops ret=0 mbind_pfnmap mbind(MPOL_BIND, n1, MPOL_MF_STRICT) oops ret=0 mbind_real mbind(MPOL_BIND, n1, MPOL_MF_STRICT) -EIO ret=0
Two things the table shows that are easy to miss in the code:
-
mbind_mixed passes only MPOL_MF_MOVE. MPOL_MF_STRICT is not needed for a VM_MIXEDMAP vma: walk_page_test() only skips VM_PFNMAP, and vma_migratable() is true for VM_MIXEDMAP.
-
mbind_real demonstrates the user visible change (-EIO -> 0)
This patch (of 2):
mmap a VM_PFNMAP region whose ->huge_fault installs a PMD through vmf_insert_pfn_pmd() - a vfio-pci MMIO BAR does this - then
mbind(p, len, MPOL_BIND, &mask, maxnode, MPOL_MF_STRICT);
With a stand-in module for the driver:
BUG: unable to handle page fault for address: fffff96dc0000008 RIP: 0010:queue_folios_pte_range+0xaf/0x440 walk_pgd_range+0x52b/0xaf0 __walk_page_range+0x6a/0x1d0 walk_page_range_mm_unsafe+0x193/0x230 queue_pages_range+0x64/0xa0 do_mbind+0x25e/0x640
queue_folios_pmd(), inlined above, calls pmd_folio() on that PMD. The pfn is raw MMIO with no memmap entry, so ---truncated---
{
"affected": [],
"aliases": [
"CVE-2026-138862"
],
"database_specific": {
"cwe_ids": [],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-30T14:17:42Z",
"severity": null
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mempolicy: use vm_normal_folio_pmd() in queue_folios_pmd()\n\nPatch series \"mm: stop calling pmd_folio() on special PMDs\", v3.\n\nTwo page table walkers resolve the folio behind a PMD with pmd_folio(),\nwhich is only valid for a PMD mapping a refcounted struct page:\n\n madvise_cold_or_pageout_pte_range() mm/madvise.c\n queue_folios_pmd() mm/mempolicy.c\n\nvmf_insert_pfn_pmd() installs special PMDs holding a raw pfn that need not\nhave a memmap entry at all. Both walkers can reach one and fault on the\nfirst folio field read. The PTE halves of both already use\nvm_normal_folio(); these two patches make the PMD halves match.\n\nThe four callers of vmf_insert_pfn_pmd(), and which walker each reaches:\n\n drivers/vfio/pci/vfio_pci_core.c VM_PFNMAP mempolicy\n drivers/gpu/drm/drm_gem_shmem_helper.c VM_PFNMAP mempolicy\n drivers/gpu/drm/panthor/panthor_gem.c VM_PFNMAP mempolicy\n drivers/hv/mshv_vtl_main.c VM_MIXEDMAP both\n\ncan_madv_lru_vma() rejects VM_PFNMAP, so only mshv_vtl_low reaches the\nmadvise walker, and that needs CAP_SYS_ADMIN. queue_pages_walk_ops\nsupplies its own -\u003etest_walk, so walk_page_test()\u0027s generic VM_PFNMAP skip\nnever runs and vfio-pci is reachable by any process holding the device fd.\nHence the different stable tags.\n\nOne behaviour change: mbind(MPOL_MF_STRICT) over a PMD mapped VM_PFNMAP\nregion now returns 0 rather than -EIO. The PTE loop already returned 0\nthere. drm_gem_shmem and panthor are where this is observable, since they\nPMD map pages that do have a memmap entry and so never faulted.\n\nReproducer\n==========\n\nNo hardware needed. An out of tree module stands in for the drivers\nabove: three misc devices, each with a -\u003ehuge_fault calling\nvmf_insert_pfn_pmd(), plus VM_HUGEPAGE so the fault path takes the PMD\nbranch.\n\n /dev/pmdspec_mixed VM_MIXEDMAP, pfn at the 1 TiB mark, no memmap\n /dev/pmdspec_pfnmap VM_PFNMAP, pfn at the 1 TiB mark, no memmap\n /dev/pmdspec_real VM_PFNMAP, real alloc_pages(PMD_ORDER) on node 0\n\nUserspace maps the device into a PMD aligned window, reads one byte to\nfault the PMD in, checks a module parameter to confirm it went in, then\nissues the operation.\n\n vng --run \u003cbzImage\u003e --user root --memory 4G --verbose \\\n --append \"numa=fake=2\" \\\n --exec \"insmod pmdspec.ko \u0026\u0026 ./pmdspec_test \u003csubtest\u003e\"\n\nnuma=fake=2 gives a node 1 to bind to; the module allocates its real page\non node 0, which is what makes queue_folio_required() true.\n\n subtest operation parent series\n --------------------------------------------------------------------\n madv_cold madvise(MADV_COLD) oops ret=0\n madv_pageout madvise(MADV_PAGEOUT) oops ret=0\n mbind_mixed mbind(MPOL_BIND, n1, MPOL_MF_MOVE) oops ret=0\n mbind_pfnmap mbind(MPOL_BIND, n1, MPOL_MF_STRICT) oops ret=0\n mbind_real mbind(MPOL_BIND, n1, MPOL_MF_STRICT) -EIO ret=0\n\nTwo things the table shows that are easy to miss in the code:\n\n - mbind_mixed passes only MPOL_MF_MOVE. MPOL_MF_STRICT is not needed for\n a VM_MIXEDMAP vma: walk_page_test() only skips VM_PFNMAP, and\n vma_migratable() is true for VM_MIXEDMAP.\n\n - mbind_real demonstrates the user visible change (-EIO -\u003e 0)\n\n\nThis patch (of 2):\n\nmmap a VM_PFNMAP region whose -\u003ehuge_fault installs a PMD through\nvmf_insert_pfn_pmd() - a vfio-pci MMIO BAR does this - then\n\n\tmbind(p, len, MPOL_BIND, \u0026mask, maxnode, MPOL_MF_STRICT);\n\nWith a stand-in module for the driver:\n\n BUG: unable to handle page fault for address: fffff96dc0000008\n RIP: 0010:queue_folios_pte_range+0xaf/0x440\n walk_pgd_range+0x52b/0xaf0\n __walk_page_range+0x6a/0x1d0\n walk_page_range_mm_unsafe+0x193/0x230\n queue_pages_range+0x64/0xa0\n do_mbind+0x25e/0x640\n\nqueue_folios_pmd(), inlined above, calls pmd_folio() on that PMD. The pfn\nis raw MMIO with no memmap entry, so\n---truncated---",
"id": "GHSA-p9wx-p2fh-698j",
"modified": "2026-11-30T15:32:07Z",
"published": "2026-11-30T15:32:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138862"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/2e10d5209d83196d1800a8199e69139454c298a4"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/5e3097e128cd92ac663849164af18220cf12eb0f"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/8565957d9047029904b7541ba87f08a9e860b59e"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/9057170a941f0c5f4058f6fb9ab5d5fc9fcc9e83"
}
],
"schema_version": "1.4.0",
"severity": []
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.