-

CVE-2026-99642

mm/gup: check folio->mapping under folio lock in memfd_pin_folios()

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

mm/gup: check folio->mapping under folio lock in memfd_pin_folios()

memfd_pin_folios() pins folios from the page cache without taking the
folio lock. khugepaged or MADV_COLLAPSE can therefore replace a folio
after checking its refcount while memfd_pin_folios() still pins the old
folio. The caller then receives a folio which is no longer part of the
memfd.

For udmabuf and iommufd, this can cause data corruption: DMA accesses
the detached folio rather than the live memfd contents. DMA reads can
return stale data, while DMA writes update the detached copy and are
lost from the live memfd. The detached folio remains pinned, so these
accesses do not constitute a use-after-free or target another
application's memory. For memfd live update, the stale contents can
reappear in the memfd after handover.

Lock the folio and recheck folio->mapping before pinning it, like other
page cache users do. If the folio was removed, retry the folio lookup
from the index that was removed.
Daten sind bereitgestellt durch das CVE Programm von einer CVE Numbering Authority (CNA) (Unstrukturiert).
HerstellerLinux
≫
Produkt Linux
Default Statusunaffected
Version 89c1905d9c140372b7f50ef48f42378cf85d9bc5
Version < 240bc9b873d3522672db13ea93ec73b7f0461912
Status affected
Version 89c1905d9c140372b7f50ef48f42378cf85d9bc5
Version < 4480eb27975b91a28bc058a2ca16f466ebd9d7cd
Status affected
Version 89c1905d9c140372b7f50ef48f42378cf85d9bc5
Version < 6ac69b444b85d0e511d9bc15f586ebeed49322fa
Status affected
Version 89c1905d9c140372b7f50ef48f42378cf85d9bc5
Version < 71555ae8c7572fd99158013ca2e29187c5d2508d
Status affected
HerstellerLinux
≫
Produkt Linux
Default Statusaffected
Version 6.11
Status affected
Version 0
Version < 6.11
Status unaffected
Version <= 6.12.*
Version 6.12.118
Status unaffected
Version <= 6.18.*
Version 6.18.64
Status unaffected
Version <= 7.3.*
Version 7.3.5
Status unaffected
Version <= *
Version 7.4-rc2
Status unaffected
VulnDex Vulnerability Enrichment
Diese Information steht angemeldeten Benutzern zur Verfügung. Login Login
Zu dieser CVE wurde keine Warnung gefunden.
EPSS Metriken
Typ Quelle Score Percentile
EPSS FIRST.org 0.17% 0.063
CVSS Metriken
Quelle Base Score Exploit Score Impact Score Vector String
Es wurden noch keine Informationen zu CWE veröffentlicht.
https://git.kernel.org/stable/c/240bc9b873d3522672db13ea93ec73b7f0461912
https://git.kernel.org/stable/c/4480eb27975b91a28bc058a2ca16f466ebd9d7cd
https://git.kernel.org/stable/c/6ac69b444b85d0e511d9bc15f586ebeed49322fa
https://git.kernel.org/stable/c/71555ae8c7572fd99158013ca2e29187c5d2508d