# CVE-2026-89805: drm/pagemap: Fix folio allocation fallback and use-after-put

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 3, 2026-11-26)
- **Published:** 2026-09-16T10:30:38.606Z
- **Modified:** 2026-10-19T09:18:24.307Z

## Who should check

- Anyone running Linux \>= ddeda6136038b4b313bb6f9b44f2d363e1233814, \< 10e92e18e3dab081789d868878f2ecce6166948a; \>= ddeda6136038b4b313bb6f9b44f2d363e1233814, \< df72e55e754c8d449321ddddad19a8bd3cb8d032
- Anyone running Linux 6.18

## Description

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().

## Affected and fixed versions

- Linux: \>= ddeda6136038b4b313bb6f9b44f2d363e1233814, \< 10e92e18e3dab081789d868878f2ecce6166948a; \>= ddeda6136038b4b313bb6f9b44f2d363e1233814, \< df72e55e754c8d449321ddddad19a8bd3cb8d032 (cvelist)
- Linux: 6.18 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-89805. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89805.md
Affected: Linux >= ddeda6136038b4b313bb6f9b44f2d363e1233814, < 10e92e18e3dab081789d868878f2ecce6166948a; >= ddeda6136038b4b313bb6f9b44f2d363e1233814, < df72e55e754c8d449321ddddad19a8bd3cb8d032; Linux 6.18
Fixed in: Linux 10e92e18e3dab081789d868878f2ecce6166948a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-89805 being exploited?

There is no confirmed exploitation: CVE-2026-89805 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.17% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-89805?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-89805?

Linux \>= ddeda6136038b4b313bb6f9b44f2d363e1233814, \< 10e92e18e3dab081789d868878f2ecce6166948a; \>= ddeda6136038b4b313bb6f9b44f2d363e1233814, \< df72e55e754c8d449321ddddad19a8bd3cb8d032; Linux 6.18.

### Is there a fix for CVE-2026-89805?

Yes. Fixed in Linux 10e92e18e3dab081789d868878f2ecce6166948a. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-89805?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/10e92e18e3dab081789d868878f2ecce6166948a>
- other: <https://git.kernel.org/stable/c/df72e55e754c8d449321ddddad19a8bd3cb8d032>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-89805>

HTML: <https://flawdb.com/CVE-2026-89805> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-89805>
