CVE-2026-99463 (GCVE-0-2026-99463)

Vulnerability from cvelistv5 – Published: 2026-11-19 14:42 – Updated: 2026-11-22 11:08
VLAI
Title
mm/rmap: don't discard lazyfree THPs at PMD level
Summary
In the Linux kernel, the following vulnerability has been resolved: mm/rmap: don't discard lazyfree THPs at PMD level __discard_anon_folio_pmd_locked() clears a lazyfree THP's PMD before it determines whether the folio can be discarded, and restores it if the folio is dirty or has extra references. It is done under only the PMD lock and the anon_vma read lock inside try_to_unmap_one() and no mmap lock is held. The temporarily none PMD causes UAF. A parallel munmap() or mremap() is supposed to serialize with it on the PMD lock, but zap_pmd_range() (called by munmap()) and move_page_tables() (called by mremap()) do not take the lock when they see the temporarily none PMD and skip the PMD. There is no more page table walk after the none PMD is restored: - munmap(): free_pgtables() waits in unlink_anon_vmas() for the anon_vma lock, then free_pmd_range() drops the restored PMD as bad without removing the rmap, so the folio keeps a stale mapcount. - whole-VMA MREMAP_DONTUNMAP: dontunmap_complete() unlinks the source VMA from its anon_vma while the restored PMD still maps the folio. - plain mremap(): the THP is not moved but unmapped, so the THP's data is lost. In the first two cases, the folio stays mapped, but no VMA that maps it is linked to its anon_vma. When the anon_vma is freed, it is still reachable when one rmap walks the folio. Racing lazyfree reclaim against MREMAP_DONTUNMAP as an unprivileged user reproduces a KASAN use-after-free in folio_lock_anon_vma_read() as reported in the Closes link. One solution is to use an invalidated PMD instead of a cleared one until the discard is committed, but it needs arch fixes first. 1. GUP-fast still follows an invalidated PMD on riscv, LoongArch and s390. 2. sparc64 miscounts thp_pte_count when an invalidated PMD is set again or cleared. To keep the fix simple for backport, stop discarding lazyfree THPs at PMD level instead. try_to_unmap_one() splits the PMD and discards the folio at PTE level. unmap_huge_pmd_locked() and __discard_anon_folio_pmd_locked() are left in place, unused, to minimize this fix for backport and the invalidated PMD approach is planned as a follow-up series to use them again.
Impacted products
Vendor Product Version
Linux Linux Affected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc , < 8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3 (git)
Affected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc , < 3594027c292b09d9301b4be80fa8e0c815ffaf2a (git)
Affected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc , < b8c683bd548268453d50e933aab2e7d50a7ac2be (git)
Affected: 735ecdfaf4e802209caf34b7ac45adf448c54ccc , < 984c0700854e35779a2bcce6b02783e709b6efa2 (git)
Create a notification for this product.
Linux Linux Affected: 6.11
Unaffected: 0 , < 6.11 (semver)
Unaffected: 6.12.117 , ≤ 6.12.* (semver)
Unaffected: 6.18.61 , ≤ 6.18.* (semver)
Unaffected: 7.3.2 , ≤ 7.3.* (semver)
Unaffected: 7.4-rc1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/rmap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3",
              "status": "affected",
              "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
              "versionType": "git"
            },
            {
              "lessThan": "3594027c292b09d9301b4be80fa8e0c815ffaf2a",
              "status": "affected",
              "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
              "versionType": "git"
            },
            {
              "lessThan": "b8c683bd548268453d50e933aab2e7d50a7ac2be",
              "status": "affected",
              "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
              "versionType": "git"
            },
            {
              "lessThan": "984c0700854e35779a2bcce6b02783e709b6efa2",
              "status": "affected",
              "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/rmap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.11"
            },
            {
              "lessThan": "6.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.117",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.61",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.117",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.61",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3.2",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.4-rc1",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/rmap: don\u0027t discard lazyfree THPs at PMD level\n\n__discard_anon_folio_pmd_locked() clears a lazyfree THP\u0027s PMD before it\ndetermines whether the folio can be discarded, and restores it if the\nfolio is dirty or has extra references.  It is done under only the PMD\nlock and the anon_vma read lock inside try_to_unmap_one() and no mmap lock\nis held.  The temporarily none PMD causes UAF.\n\nA parallel munmap() or mremap() is supposed to serialize with it on the\nPMD lock, but zap_pmd_range() (called by munmap()) and move_page_tables()\n(called by mremap()) do not take the lock when they see the temporarily\nnone PMD and skip the PMD.  There is no more page table walk after the\nnone PMD is restored:\n\n- munmap(): free_pgtables() waits in unlink_anon_vmas() for the anon_vma\n  lock, then free_pmd_range() drops the restored PMD as bad without\n  removing the rmap, so the folio keeps a stale mapcount.\n\n- whole-VMA MREMAP_DONTUNMAP: dontunmap_complete() unlinks the source VMA\n  from its anon_vma while the restored PMD still maps the folio.\n\n- plain mremap(): the THP is not moved but unmapped, so the THP\u0027s data is\n  lost.\n\nIn the first two cases, the folio stays mapped, but no VMA that maps it is\nlinked to its anon_vma.  When the anon_vma is freed, it is still reachable\nwhen one rmap walks the folio.  Racing lazyfree reclaim against\nMREMAP_DONTUNMAP as an unprivileged user reproduces a KASAN use-after-free\nin folio_lock_anon_vma_read() as reported in the Closes link.\n\nOne solution is to use an invalidated PMD instead of a cleared one until\nthe discard is committed, but it needs arch fixes first.\n1. GUP-fast still follows an invalidated PMD on riscv, LoongArch and s390.\n2. sparc64 miscounts thp_pte_count when an invalidated PMD is set again or\n   cleared.\n\nTo keep the fix simple for backport, stop discarding lazyfree THPs at PMD\nlevel instead. try_to_unmap_one() splits the PMD and discards the folio at\nPTE level.\n\nunmap_huge_pmd_locked() and __discard_anon_folio_pmd_locked() are left in\nplace, unused, to minimize this fix for backport and the invalidated PMD\napproach is planned as a follow-up series to use them again."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - madvise(MADV_PAGEOUT) enters madvise_pageout(), which isolates the folio and calls reclaim_pages() -\u003e shrink_folio_list() -\u003e try_to_unmap() -\u003e try_to_unmap_one(), the function the fix changes. MADV_FREE has already made the THP lazyfree through madvise_free_huge_pmd() and folio_mark_lazyfree(). The colliding munmap() or mremap(MREMAP_DONTUNMAP) is the same caller\u0027s syscall.\nAC:L - The attacker faults a PMD THP, marks it lazyfree, and keeps a read-only GUP ref. __discard_anon_folio_pmd_locked() then hits ref_count != map_count + 1 and set_pmd_at() restores the PMD that pmdp_huge_clear_flush() cleared. Concurrently get_old_pmd() or zap_pmd_range() samples that none PMD without the PMD lock. The attacker runs both syscalls and can retry.\nPR:L - SYSCALL_DEFINE3(madvise) and SYSCALL_DEFINE5(mremap) accept MADV_FREE, MADV_PAGEOUT, and MREMAP_DONTUNMAP from any local uid on its own anonymous VMA. CAP_SYS_ADMIN is checked only in madvise_inject_error() for MADV_HWPOISON. do_mremap() locks only current-\u003emm.\nUI:N - The attacker creates the anonymous mapping and issues MADV_FREE, MADV_PAGEOUT, and munmap() or mremap(MREMAP_DONTUNMAP) against it. zap_pmd_range() and dontunmap_complete() then run in that same process.\nS:U - put_anon_vma() frees an anon_vma from anon_vma_cachep in the kernel that is running the attacker, and folio_lock_anon_vma_read() then uses the stale folio-\u003emapping. The corrupted object and the walk stay in that kernel.\nC:H - unlink_anon_vmas() in dontunmap_complete() or free_pgtables() drops the last anon_vma reference while the restored PMD still maps the folio, so folio-\u003emapping dangles. folio_lock_anon_vma_read() then reads anon_vma-\u003eroot and locks root-\u003erwsem; a recycled anon_vma_cachep object makes that walk follow another root and its interval tree.\nI:H - down_read_trylock() writes the freed anon_vma rwsem. Once anon_vma_cachep reuses the slot, rmap_walk_anon() invokes try_to_unmap_one(), whose get_and_clear_ptes() clears PTEs of the recycled tree. free_pmd_range() also pmd_clear_bad()s the restored huge PMD without folio_remove_rmap_pmd(), leaving a stale mapcount.\nA:H - Racing lazyfree reclaim with MREMAP_DONTUNMAP is a KASAN use-after-free in folio_lock_anon_vma_read() on the freed anon_vma and oopses the kernel. move_page_tables() also skips the transient none PMD, so a plain mremap() drops the THP and loses its data."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-22T11:08:26.233Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3"
        },
        {
          "url": "https://git.kernel.org/stable/c/3594027c292b09d9301b4be80fa8e0c815ffaf2a"
        },
        {
          "url": "https://git.kernel.org/stable/c/b8c683bd548268453d50e933aab2e7d50a7ac2be"
        },
        {
          "url": "https://git.kernel.org/stable/c/984c0700854e35779a2bcce6b02783e709b6efa2"
        }
      ],
      "title": "mm/rmap: don\u0027t discard lazyfree THPs at PMD level",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-99463",
    "datePublished": "2026-11-19T14:42:16.661Z",
    "dateReserved": "2026-09-25T10:25:14.416Z",
    "dateUpdated": "2026-11-22T11:08:26.233Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-99463",
      "date": "2026-11-22",
      "epss": "0.00168",
      "percentile": "0.06223"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "mm/rmap.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3",
                    "status": "affected",
                    "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "3594027c292b09d9301b4be80fa8e0c815ffaf2a",
                    "status": "affected",
                    "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "b8c683bd548268453d50e933aab2e7d50a7ac2be",
                    "status": "affected",
                    "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "984c0700854e35779a2bcce6b02783e709b6efa2",
                    "status": "affected",
                    "version": "735ecdfaf4e802209caf34b7ac45adf448c54ccc",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "mm/rmap.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.11"
                  },
                  {
                    "lessThan": "6.11",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.12.*",
                    "status": "unaffected",
                    "version": "6.12.117",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.18.*",
                    "status": "unaffected",
                    "version": "6.18.61",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.3.*",
                    "status": "unaffected",
                    "version": "7.3.2",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.4-rc1",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/rmap: don\u0027t discard lazyfree THPs at PMD level\n\n__discard_anon_folio_pmd_locked() clears a lazyfree THP\u0027s PMD before it\ndetermines whether the folio can be discarded, and restores it if the\nfolio is dirty or has extra references.  It is done under only the PMD\nlock and the anon_vma read lock inside try_to_unmap_one() and no mmap lock\nis held.  The temporarily none PMD causes UAF.\n\nA parallel munmap() or mremap() is supposed to serialize with it on the\nPMD lock, but zap_pmd_range() (called by munmap()) and move_page_tables()\n(called by mremap()) do not take the lock when they see the temporarily\nnone PMD and skip the PMD.  There is no more page table walk after the\nnone PMD is restored:\n\n- munmap(): free_pgtables() waits in unlink_anon_vmas() for the anon_vma\n  lock, then free_pmd_range() drops the restored PMD as bad without\n  removing the rmap, so the folio keeps a stale mapcount.\n\n- whole-VMA MREMAP_DONTUNMAP: dontunmap_complete() unlinks the source VMA\n  from its anon_vma while the restored PMD still maps the folio.\n\n- plain mremap(): the THP is not moved but unmapped, so the THP\u0027s data is\n  lost.\n\nIn the first two cases, the folio stays mapped, but no VMA that maps it is\nlinked to its anon_vma.  When the anon_vma is freed, it is still reachable\nwhen one rmap walks the folio.  Racing lazyfree reclaim against\nMREMAP_DONTUNMAP as an unprivileged user reproduces a KASAN use-after-free\nin folio_lock_anon_vma_read() as reported in the Closes link.\n\nOne solution is to use an invalidated PMD instead of a cleared one until\nthe discard is committed, but it needs arch fixes first.\n1. GUP-fast still follows an invalidated PMD on riscv, LoongArch and s390.\n2. sparc64 miscounts thp_pte_count when an invalidated PMD is set again or\n   cleared.\n\nTo keep the fix simple for backport, stop discarding lazyfree THPs at PMD\nlevel instead. try_to_unmap_one() splits the PMD and discards the folio at\nPTE level.\n\nunmap_huge_pmd_locked() and __discard_anon_folio_pmd_locked() are left in\nplace, unused, to minimize this fix for backport and the invalidated PMD\napproach is planned as a follow-up series to use them again."
          }
        ],
        "id": "CVE-2026-99463",
        "lastModified": "2026-11-22T11:16:52.857",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-11-19T15:18:00.473",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/3594027c292b09d9301b4be80fa8e0c815ffaf2a"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/8cf9517996067cfbfc5abdb4cfb3d7e15a7b34a3"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/984c0700854e35779a2bcce6b02783e709b6efa2"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/b8c683bd548268453d50e933aab2e7d50a7ac2be"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Important",
      "current_release_date": "2026-11-22T11:31:06+00:00",
      "cve": "CVE-2026-99463",
      "id": "CVE-2026-99463",
      "initial_release_date": "2026-11-19T14:42:16.661000+00:00",
      "product_status:known_affected": "16",
      "product_status:known_not_affected": "188",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: kernel: Privilege escalation via use-after-free in transparent huge page reclaim",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-99463.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

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.

Loading…

Loading…

Loading…

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.


Loading…