GHSA-96J2-9C5R-35JC

Vulnerability from github – Published: 2026-09-16 12:30 – Updated: 2026-09-16 15:30
VLAI
Details

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

drm/pagemap: Fix folio allocation fallback and use-after-put

drm_pagemap_migrate_populate_ram_pfn() had two issues when populating RAM PFNs with higher-order folios:

  1. The higher-order vma_alloc_folio()/folio_alloc() calls did not pass __GFP_NOWARN, so a THP allocation failure under memory pressure would spam the kernel log, and there was no fallback path despite a TODO comment stating one was needed. Add __GFP_NOWARN to the higher-order allocation and, on failure, fall back to order-0 allocations for the entire range originally covered by the failed higher-order allocation, leaving MIGRATE_PFN_COMPOUND unset for those PFNs.

  2. In the free_pages error path, order was computed via folio_order(page_folio(page)) after put_page(page) had already dropped the reference, resulting in a use-after-free/put when that was the last reference on the page. Compute order before releasing the page.

Introducing the fallback in 1. also requires the source page array handed to ->copy_to_ram() to be built differently. Both callers only populated the entry at the head of each source folio, relying on the copy callback to derive the rest of the folio from the order recorded in the matching drm_pagemap_addr. Once the destination has been demoted to order-0 folios the drm_pagemap_addr entries are per-page, so a source page is needed for every one of them; leaving them NULL makes the copy callback stop after the first page and the remainder of the range is never copied.

The source folio is only split later, by migrate_vma_pages() / migrate_device_pages(), so its order cannot be used to detect the demotion - test the destination for MIGRATE_PFN_COMPOUND instead. Factor the array population out into drm_pagemap_migrate_populate_src_pages() and use it from both drm_pagemap_evict_to_ram() and __drm_pagemap_migrate_to_ram().

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-89805"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-09-16T11:16:45Z",
    "severity": "HIGH"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/pagemap: Fix folio allocation fallback and use-after-put\n\ndrm_pagemap_migrate_populate_ram_pfn() had two issues when populating\nRAM PFNs with higher-order folios:\n\n1. The higher-order vma_alloc_folio()/folio_alloc() calls did not pass\n   __GFP_NOWARN, so a THP allocation failure under memory pressure\n   would spam the kernel log, and there was no fallback path despite a\n   TODO comment stating one was needed. Add __GFP_NOWARN to the\n   higher-order allocation and, on failure, fall back to order-0\n   allocations for the entire range originally covered by the failed\n   higher-order allocation, leaving MIGRATE_PFN_COMPOUND unset for\n   those PFNs.\n\n2. In the free_pages error path, order was computed via\n   folio_order(page_folio(page)) *after* put_page(page) had already\n   dropped the reference, resulting in a use-after-free/put when that\n   was the last reference on the page. Compute order before releasing\n   the page.\n\nIntroducing the fallback in 1. also requires the source page array\nhanded to -\u003ecopy_to_ram() to be built differently. Both callers only\npopulated the entry at the head of each source folio, relying on the\ncopy callback to derive the rest of the folio from the order recorded\nin the matching drm_pagemap_addr. Once the destination has been demoted\nto order-0 folios the drm_pagemap_addr entries are per-page, so a source\npage is needed for every one of them; leaving them NULL makes the copy\ncallback stop after the first page and the remainder of the range is\nnever copied.\n\nThe source folio is only split later, by migrate_vma_pages() /\nmigrate_device_pages(), so its order cannot be used to detect the\ndemotion - test the destination for MIGRATE_PFN_COMPOUND instead. Factor\nthe array population out into drm_pagemap_migrate_populate_src_pages()\nand use it from both drm_pagemap_evict_to_ram() and\n__drm_pagemap_migrate_to_ram().",
  "id": "GHSA-96j2-9c5r-35jc",
  "modified": "2026-09-16T15:30:58Z",
  "published": "2026-09-16T12:30:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-89805"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/10e92e18e3dab081789d868878f2ecce6166948a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/df72e55e754c8d449321ddddad19a8bd3cb8d032"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}



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…