Skip to main content

Linux Kernel CVE-2024-26960

HIGH
Race Condition (CWE-362)
2024-05-01 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.0
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain local low-privilege shell
  2. Delivery
    Enable concurrent swap entry free across two processes on shared THP folio
  3. Exploit
    Thread preempted after SWAP_HAS_CACHE state reached
  4. Install
    Second thread drains inuse_pages to zero
  5. C2
    Swapoff tears down swap_info_struct and frees swap_map
  6. Execute
    Preempted thread resumes and dereferences freed swap_map
  7. Impact
    Kernel 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Aug 04, 2026 - 13:08 cvss changed CVSS 7.0

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

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY 7.0 HIGH
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

Local-only attack via kernel swap subsystem; high complexity race condition; low-privilege account required; use-after-free enables full kernel memory impact.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Updated
Aug 04, 2026 - 13:11 vuln.today
v2 - CVSS changed
Analysis Updated
Aug 04, 2026 - 13:08 vuln.today
v1 - CVSS changed
Severity Changed
Aug 04, 2026 - 11:23 NVD
MEDIUM HIGH
CVSS changed
Aug 04, 2026 - 11:23 NVD
5.5 (MEDIUM) 7.0 (HIGH)
CVE Published
May 01, 2024 - 06:15 cve.org
MEDIUM 5.5

DescriptionCVE.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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 100% exploitable
Prevalence
Ubiquitous
Linux kernel underlies most servers, cloud VMs, and embedded deployments worldwide
Data Quality
4 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

35
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +35
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
CVE-2021-44228 CRITICAL POC
10.0 Dec 10

Apache Log4j2 contains a critical JNDI injection vulnerability known as 'Log4Shell' that allows unauthenticated remote c

CVE-2019-11043 CRITICAL POC
9.8 Oct 28

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

CVE-2012-1823 CRITICAL POC
9.8 May 11

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

CVE-2014-6271 CRITICAL POC
9.8 Sep 24

GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which

CVE-2017-7494 CRITICAL POC
9.8 May 30

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

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2022-30333 HIGH POC
7.5 May 09

RARLAB UnRAR before 6.12 on Linux and UNIX allows directory traversal to write to files during an extract (aka unpack) o

CVE-2016-3714 HIGH POC
8.4 May 05

The (1) EPHEMERAL, (2) HTTPS, (3) MVG, (4) MSL, (5) TEXT, (6) SHOW, (7) WIN, and (8) PLT coders in ImageMagick before 6.

CVE-2017-12617 HIGH POC
8.1 Oct 04

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

CVE-2020-1938 CRITICAL POC
9.8 Feb 24

When using the Apache JServ Protocol (AJP), care must be taken when trusting incoming connections to Apache Tomcat. Rate

CVE-2018-7602 CRITICAL POC
9.8 Jul 19

A remote code execution vulnerability exists within multiple subsystems of Drupal 7.x and 8.x. Rated critical severity (

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy