Vulnerability record
mm/swap: fix swap_cache_get_folio() returning a folio that left the swap cache
In the Linux kernel, the following vulnerability has been resolved:
mm/swap: fix swap_cache_get_folio() returning a folio that left the swap cache
swap_cache_get_folio() reads the folio from the swap table and takes a reference with folio_try_get(), without any lock. If the folio is removed from the swap cache and freed in between, and its memory gets reused, folio_try_get() still succeeds and we return a page that has nothing to do with the swap entry:
CPU 0 CPU 1 do_swap_page() swap_cache_get_folio() swp_tb = swap_table_get() folio =…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources