Race condition in Linux kernel swap cache lookup returns stale folio
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Partial Red Hat: 1 without a fix
No CVSS vector from any source. Fix status from CNA and Red Hat.
Summary
The Linux kernel from 6.18 is affected. In the swap cache lookup, swap_cache_get_folio() takes a reference to a folio without rechecking that the swap slot still holds it, so it can return a page that was freed and reused for an unrelated purpose. The swap fault path can then clear flags on or lock that unrelated page, which may cause stalls and impaired reclaim for other workloads. The swap-entry validation that follows prevents the wrong folio from being mapped into the faulting process.
Written with Claude Haiku 5.5 from the sources below · 2026-12-01
Description from the CNA
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 = swp_tb_to_folio(swp_tb) madvise(MADV_DONTNEED) zap_nonpresent_ptes() swap_put_entries_direct() swap_put_entries_cluster() __try_to_reclaim_swap() swap_cache_del_folio() folio_put() <- freed page reused, e.g. as an anon folio of another task folio_try_get(folio) <- succeeds return folio swap_update_readahead() <- may clear PG_readahead on it folio_lock_or_retry() <- locks it folio_matches_swap_entry() fails, unlock and put filemap_get_entry() does the same lockless lookup for the page cache, and after folio_try_get() it rechecks the xarray, because the folio may have been freed and reused in between. swap_cache_get_folio() lost that recheck when the swap cache moved to the swap table. So CPU 0 writes to a folio it doesn't own: it may clear PG_readahead and takes the folio lock of someone else's page, before folio_matches_swap_entry() finds out the folio is not ours. When the race occurs, a swap fault can acquire a reference to a physical page that has been freed and reused for an unrelated purpose, potentially by another process. The fault handler may then clear that page's PG_readahead/PG_reclaim flag, wait on or acquire its folio lock, and potentially attempt to remove it from an unrelated swap cache. These operations can interfere with unrelated workloads and may cause unexpected stalls and impaired reclaim. The subsequent swap-entry validation normally prevents the wrong folio from being mapped into the faulting process. It's documented that caller always double checks the folio so this part is harmless from the aspect of data corruption or crash. Recheck the slot after folio_try_get() and retry if it no longer holds this folio. [[email protected]: add LLM-generated description of userspace impact]
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Fixed versions are Linux kernel 6.18.63, 7.3.4 and 7.4-rc1. Red Hat's plan for Red Hat Enterprise Linux 10 is none available.
Written with Claude Haiku 5.5 from the sources below · 2026-12-01
- Fix · CNA Linux (Linux) Fixed in 6.18.63, 7.3.4, 7.4-rc1
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
Not affected: 6 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift Container Platform 4
- Red Hat OpenShift Container Platform 5
Timeline
- 2026-11-30 Threatist record created from CVE-2026-99917
- 2026-11-30 Alias added: GHSA-jrpm-j698-m2vm
- 2026-12-01 Affected versions changed · Red Hat
- 2026-12-01 CVSS score added · Red Hat
References
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-99917 · CVE Program
- CVE-2026-99917 · NVD
- GHSA-jrpm-j698-m2vm · GitHub Advisory Database · CC BY 4.0
- CVE-2026-99917 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences