Linux Kernel
CVE-2024-26960
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain local low-privilege shell
-
DeliveryEnable concurrent swap entry free across two processes on shared THP folio
-
ExploitThread preempted after SWAP_HAS_CACHE state reached
-
InstallSecond thread drains inuse_pages to zero
-
C2Swapoff tears down swap_info_struct and frees swap_map
-
ExecutePreempted thread resumes and dereferences freed swap_map
-
ImpactKernel use-after-free read yields information disclosure or memory corruption
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Concurrency control, locking
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires: (1) a local user account with at least low privileges (PR:L per CVSS vector); (2) the target system must have swap enabled and actively in use during a swapoff() operation; (3) transparent huge pages (THP) must be in use, specifically a large folio (e.g., 2 MiB) in the swap cache with multiple subpages still referenced by separate swap entries from distinct processes; (4) high attack complexity (AC:H) - the attacker must win a precise timing race between free_swap_and_cache() across two threads and the swapoff() teardown path. Limiting factors: the race window is extremely narrow and has not been reliably reproduced even by the reporter; swapoff() must be running concurrently with the swap entry free operations; and the specific folio/subpage reference counting state must be reached simultaneously by two independent processes. Systems with swap disabled are not affected. Systems not using THP reduce but do not eliminate the attack surface. |
| Impact | Real-world risk is low despite the CVSS 7.0 score. CVSS vector AV:L/AC:H/PR:L confirms local access with high attack complexity - an attacker must already have a foothold on the target system and must win a narrow timing race across concurrent kernel threads manipulating swap state on a huge THP folio, a condition that is difficult to reliably reproduce. EPSS of 0.01% (0th percentile) independently corroborates negligible exploitation probability; no public POC exists, and the vulnerability is absent from CISA KEV. The original reporter explicitly states the issue has not been reproduced from a test case, and community agreement was based solely on code review. The C:H/I:H/A:H impact triad reflects worst-case use-after-free consequences (kernel memory exposure, corruption, crash) rather than a demonstrated exploit chain. Defenders should prioritize patching as part of normal kernel update cycles rather than treating this as an emergency. No signal conflict between data sources: CVSS, EPSS, and KEV status all align on a low-urgency, theoretically-real-but-practically-unexploited issue. |
| Exploit ScenarioDerived | A local user with a low-privilege account on a system using transparent huge pages and swap triggers two concurrent processes that each hold a swap entry to different subpages of the same 2 MiB THP folio. Both processes exit simultaneously, each calling free_swap_and_cache(); one thread is preempted after decrementing the reference count to SWAP_HAS_CACHE. The other thread fully reclaims the folio, driving inuse_pages to zero and allowing swapoff() to tear down and free swap_info_struct including swap_map. When the first thread resumes, swap_page_trans_huge_swapped() dereferences the freed swap_map pointer, resulting in a use-after-free read. No public POC exists; the scenario requires precise timing and is considered theoretical. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 04, 2026
Use-after-free race condition in the Linux kernel's swap memory management subsystem allows a local low-privileged user to potentially access freed kernel memory, leading to information disclosure, memory corruption, or kernel crash. The race window opens when free_swap_and_cache() and swapoff() execute concurrently, causing swap_page_trans_huge_swapped() to read the already-freed swap_map of a torn-down swap_info_struct. The vulnerability author explicitly characterizes this as theoretical - no public exploit code exists, EPSS is 0.01% (0th percentile), and it is not listed in CISA KEV - but kernel developers confirmed the race is real via code review.
Earlier versions of this analysis (1)
Use-after-free memory access in the Linux kernel swap subsystem allows a local low-privilege attacker to potentially corrupt kernel memory via a race condition between free_swap_and_cache() and swapoff(). The flaw affects systems with swap and Transparent Huge Pages enabled, where concurrent processes releasing swap entries can cause swapoff() to tear down a swap_info_struct while free_swap_and_cache() still references it - specifically via swap_page_trans_huge_swapped() accessing the freed swap_map. No public exploit exists and EPSS sits at 0.01%, confirming this as a theoretically acknowledged but practically difficult-to-trigger kernel race; it is not listed in CISA KEV.
RemediationAI
Apply the upstream stable kernel patches, which are confirmed available via multiple stable-tree commits: 0f98f6d2fb5f, 1ede7f1d7eed, 2da5568ee222, 363d17e7f790, 3ce4c4c653e4, 82b1c07a0af6, and d85c11c97ecf (https://git.kernel.org/stable/c/0f98f6d2fb5fad00f8299b84b85b6bc1b6d7d19a and siblings). Debian LTS users should apply the fix announced at https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html. No specific patched version number is independently confirmed from available data beyond the commit references - consult your distribution's kernel package for the exact fixed release. A compensating control with trade-offs: disabling swap entirely (swapoff -a) eliminates the vulnerable code path at the cost of increased memory pressure and potential OOM conditions on memory-constrained hosts. Restricting local user access to the system limits exploitation surface given the PR:L requirement, but does not eliminate the race for privileged processes.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected subsystem is the Linux kernel's mm/swap layer, specifically the interaction between free_swap_and_cache() and swapoff(). CWE-362 (Concurrent Execution Using Shared Resource with Improper Synchronization) is the root cause: two code paths operate on the same swap_info_struct without a reference-counting barrier. The race is possible when a huge transparent page (THP, e.g., 2 MiB folio) sits in the swap cache with multiple subpages still referenced by swap entries. When the last reference via __swap_entry_free() sets count SWAP_HAS_CACHE, swapoff()->try_to_unuse() can see inuse_pages 0 and proceed to tear down swap_info_struct - including freeing swap_map - while another thread is still inside swap_page_trans_huge_swapped() dereferencing it. CPE data confirms the affected product is cpe:2.3:o:linux:linux_kernel across multiple version ranges, as well as Debian Linux 10.0. The fix introduces get_swap_device()/put_swap_device() reference counting around the critical section in free_swap_and_cache(), stalling swapoff() until the caller releases the device reference.
Know when Debian Linux gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Local-only attack via kernel swap subsystem; high complexity race condition; low-privilege account required; use-after-free enables full kernel memory impact.
Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).
CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Lifecycle Timeline
5DescriptionCVE.org
In the Linux kernel, the following vulnerability has been resolved:
mm: swap: fix race between free_swap_and_cache() and swapoff()
There was previously a theoretical window where swapoff() could run and teardown a swap_info_struct while a call to free_swap_and_cache() was running in another thread. This could cause, amongst other bad possibilities, swap_page_trans_huge_swapped() (called by free_swap_and_cache()) to access the freed memory for swap_map.
This is a theoretical problem and I haven't been able to provoke it from a test case. But there has been agreement based on code review that this is possible (see link below).
Fix it by using get_swap_device()/put_swap_device(), which will stall swapoff(). There was an extra check in _swap_info_get() to confirm that the swap entry was not free. This isn't present in get_swap_device() because it doesn't make sense in general due to the race between getting the reference and swapoff. So I've added an equivalent check directly in free_swap_and_cache().
Details of how to provoke one possible issue (thanks to David Hildenbrand for deriving this):
--8<-----
__swap_entry_free() might be the last user and result in "count == SWAP_HAS_CACHE".
swapoff->try_to_unuse() will stop as soon as soon as si->inuse_pages==0.
So the question is: could someone reclaim the folio and turn si->inuse_pages==0, before we completed swap_page_trans_huge_swapped().
Imagine the following: 2 MiB folio in the swapcache. Only 2 subpages are still references by swap entries.
Process 1 still references subpage 0 via swap entry. Process 2 still references subpage 1 via swap entry.
Process 1 quits. Calls free_swap_and_cache(). -> count == SWAP_HAS_CACHE [then, preempted in the hypervisor etc.]
Process 2 quits. Calls free_swap_and_cache(). -> count == SWAP_HAS_CACHE
Process 2 goes ahead, passes swap_page_trans_huge_swapped(), and calls __try_to_reclaim_swap().
__try_to_reclaim_swap()->folio_free_swap()->delete_from_swap_cache()-> put_swap_folio()->free_swap_slot()->swapcache_free_entries()-> swap_entry_free()->swap_range_free()-> ... WRITE_ONCE(si->inuse_pages, si->inuse_pages - nr_entries);
What stops swapoff to succeed after process 2 reclaimed the swap cache but before process1 finished its call to swap_page_trans_huge_swapped()?
--8<-----
Executive ViewAI
Linux systems face potential kernel crashes due to a race condition in swap memory management (CVE-2024-26960, CVSS 7.0). The vulnerability is extremely unlikely to be exploited in practice (0.01% EPSS, no evidence of active exploitation) and patches from Linux vendors are available, making this a routine patch management priority rather than an emergency response.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Race conditions occur when multiple concurrent requests exploit the brief time gap between checking a condition and acting upon it (TOCTOU - Time of Check, Time of Use).
Affected Products (CPE)CVE.org
More in Debian Linux
View allApache Log4j2 contains a critical JNDI injection vulnerability known as 'Log4Shell' that allows unauthenticated remote c
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which
Samba since version 3.5.0 and before 4.6.4, 4.5.10 and 4.4.14 is vulnerable to remote code execution vulnerability, allo
Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
RARLAB UnRAR before 6.12 on Linux and UNIX allows directory traversal to write to files during an extract (aka unpack) o
The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.
When running Apache Tomcat versions 9.0.0.M1 to 9.0.0, 8.5.0 to 8.5.22, 8.0.0.RC1 to 8.0.46 and 7.0.0 to 7.0.81 with HTT
When using the Apache JServ Protocol (AJP), care must be taken when trusting incoming connections to Apache Tomcat. Rate
A remote code execution vulnerability exists within multiple subsystems of Drupal 7.x and 8.x. Rated critical severity (
NVD
CVE.org
EPSS
VulDB
GitHub PoC
Exploit-DB