# CVE-2026-89755: mm/migrate_device: clear stale mapping after freeing swapcache

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Published: 2026-09-11T19:46:58.295Z
- Modified: 2026-11-06T18:18:23.547Z
- Assigned by: Linux

## Description

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

mm/migrate_device: clear stale mapping after freeing swapcache

__migrate_device_pages() reads the folio mapping before calling
folio_free_swap().  When folio_free_swap() succeeds, the folio is removed
from the swap cache, but the saved mapping still points to swap_space.

Passing the stale mapping to folio_migrate_mapping() makes it use the
mapped-folio path for a folio that is no longer in swapcache.  It can then
operate on swap_space.i_pages with invalid reference accounting,
eventually triggering a folio reference count BUG.

After a successful split, nr still contains the number of pages in the
original large folio, although each resulting page is now a separate
order-0 folio.  Reset nr to 1 so each split folio is processed separately,
including its own swapcache removal and mapping lookup.

Refresh the saved mapping after folio_free_swap() so the current folio
state is used during migration.

(As written by CVE List.)

## Affected

- Linux Linux: from df263d9a7dffee94ca5391120ee3b0587efa07f1 before 92db780dd644590c751246187e1229d5ac2e5544; from df263d9a7dffee94ca5391120ee3b0587efa07f1 before 4fa91f7bbc4135240b67daac03fc17d9e180a331; from df263d9a7dffee94ca5391120ee3b0587efa07f1 before c9c29481d5d4a985a57ece2090a324ba48e362a7; from df263d9a7dffee94ca5391120ee3b0587efa07f1 before 8ffedc6573a665cdc31ebe47eae7b32b78d0df83; from df263d9a7dffee94ca5391120ee3b0587efa07f1 before 34a00895d032a414830d41106a09329ae6c251b6; 6.6 (not affected: before 6.6; from 6.6.160 up to 6.6.*; from 6.12.111 up to 6.12.*; from 6.18.61 up to 6.18.*; from 7.2.4 up to 7.2.*; from 7.3 up to *)

## References

- <https://git.kernel.org/stable/c/92db780dd644590c751246187e1229d5ac2e5544>
- <https://git.kernel.org/stable/c/4fa91f7bbc4135240b67daac03fc17d9e180a331>
- <https://git.kernel.org/stable/c/c9c29481d5d4a985a57ece2090a324ba48e362a7>
- <https://git.kernel.org/stable/c/8ffedc6573a665cdc31ebe47eae7b32b78d0df83>
- <https://git.kernel.org/stable/c/34a00895d032a414830d41106a09329ae6c251b6>

## Sources

- CVE List: [CVE-2026-89755](https://www.cve.org/CVERecord?id=CVE-2026-89755), CVE Terms of Use, modified 2026-11-06
- NVD: [CVE-2026-89755](https://nvd.nist.gov/vuln/detail/CVE-2026-89755), Public domain, modified 2026-11-06

---

Page: https://cve.day/CVE-2026-89755 · Whole record: https://cve.day/CVE-2026-89755.json · Rebuilt by cve.day 2026-11-25T22:59:38.138Z
