mm/migrate_device: clear stale mapping after freeing swapcache (Linux Linux)

CVE-2026-89755
HIGH 7.8

En bref

Source
NVD
EPSS
EPSS 0.16 % · centile 5 ()
État
PUBLISHED
Publiée
Mise à jour
Attribuée par
Linux
Statut NVD
Received

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.

Références

Scores

VersionScoreVecteurÉvalué par
CVSS 3.1HIGH 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux
CVSS 3.1HIGH 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD · 416baaa9-dc9f-4396-8d5f-8c081fb06d67 (Secondary)

Références européennes

Avis du CERT-FR

Produits affectés

ProduitVersions
Linux · Linuxaffected df263d9a7dffee94ca5391120ee3b0587efa07f1 < 92db780dd644590c751246187e1229d5ac2e5544 ; affected df263d9a7dffee94ca5391120ee3b0587efa07f1 < 4fa91f7bbc4135240b67daac03fc17d9e180a331 ; affected df263d9a7dffee94ca5391120ee3b0587efa07f1 < 8ffedc6573a665cdc31ebe47eae7b32b78d0df83 ; affected df263d9a7dffee94ca5391120ee3b0587efa07f1 < 34a00895d032a414830d41106a09329ae6c251b6
Linux · Linuxaffected 6.6 ; unaffected 0 < 6.6 ; unaffected 6.6.160 ≤ 6.6.* ; unaffected 6.12.111 ≤ 6.12.* ; unaffected 7.2.4 ≤ 7.2.* ; unaffected 7.3 ≤ *

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD