{"id":"CVE-2026-89805","aliases":[],"url":"https://o3.security/vulnerability/CVE-2026-89805","summary":"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…","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 ->copy_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().","published":"2026-09-16T11:16:45.470","modified":"2026-09-16T11:16:45.470","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[],"fix":null,"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/10e92e18e3dab081789d868878f2ecce6166948a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/df72e55e754c8d449321ddddad19a8bd3cb8d032"}],"provenance":{"sources":["OSV.dev","NVD","FIRST.org (EPSS)"],"lastVerified":"2026-09-16T11:16:45.470"}}