ZeroHour

CVE-2026-89755

mass

Stale swapcache mapping causes folio refcount BUG in Linux kernel mm/migrate_device

CVSS 3.1
7.8 high
EPSS
Published
()
Modified
AI analysis

A flaw exists in the Linux kernel's device page-migration path, __migrate_device_pages(), which saves a folio's mapping before calling folio_free_swap(); if the folio is freed from the swap cache, the stale swap_space mapping is later passed to folio_migrate_mapping(), causing it to operate on swap_space.i_pages with invalid reference accounting and eventually triggering a kernel BUG (folio reference count). A related defect failed to reset the page count to 1 after splitting a large folio, so split folios were processed with the original folio's count. An attacker needs local, low-privilege code execution on a system whose workload drives device-backed migration (the migrate_device path, e.g., ZONE_DEVICE/GPU-style shared-virtual-memory drivers) over pages resident in the swap cache; the observed outcome is kernel memory-management corruption ending in a BUG, i.e., a denial of service, though the CVSS 7.8 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) rates worst-case confidentiality and integrity as high. Any system running an affected kernel that exercises this code path is exposed. The issue is not in the CISA KEV catalog, no public proof of concept exists, and no exploitation is known.

What to do: Update to a kernel containing the upstream fix (which refreshes the folio mapping after folio_free_swap() and resets nr to 1 after folio splitting) as soon as your distribution ships it, and reboot to load the patched kernel. Prioritize hosts that combine untrusted local users with workloads using device-backed page migration (e.g., GPU shared-virtual-memory or ZONE_DEVICE drivers), since those are the realistic trigger conditions. Monitor kernel logs for BUG/oops reports in the memory-migration or folio-reference-count paths as an indicator of attempted triggering.

Affected
Linux kernel (mm/migrate_device)
Estimated exposure
massBillions of devices run Linux kernels broadly, but only systems using the device page-migration (migrate_device) path with swap-cached folios are practically… — The Linux kernel ships on the majority of servers, cloud instances, and Android devices, so the code is deployed at massive scale, even though exploitation requires local access plus the specific device-migration memory-management path,…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

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.

Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.