CVE-2024-26960: mm: swap: fix race between free_swap_and_cache() and swapoff()
Noroxi assessment
Priority: Monitor (action score 28/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.18% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. Special conditions such as timing or configuration are required.
- Fixed version: Linux Linux 0f98f6d2fb5fad00f8299b84b85b6bc1b6d7d19a, 1ede7f1d7eed1738d1b9333fd1e152ccb450b86a, 2da5568ee222ce0541bfe446a07998f92ed1643e.
- Mentioned 2 times in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Low priority for now. Upgrade to Linux Linux 0f98f6d2fb5fad00f8299b84b85b6bc1b6d7d19a, 1ede7f1d7eed1738d1b9333fd1e152ccb450b86a, 2da5568ee222ce0541bfe446a07998f92ed1643e or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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<-----
- Published
- May 1, 2024
- Updated
- Oct 15, 2026
- EPSS
- 0.1% · 7th percentile
- CWE
- CWE-362
Report tools
Action score
28
Monitor
Low priority for now.
- CVSS
- 28 / 40 · 7.0 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · Linux
- 7.0
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux10.0
- linux linux kernel5.11 and later · before 5.15.154
- linux linux kernel5.16 and later · before 6.1.84
- linux linux kernel4.11 and later · before 5.10.215
- linux linux kernel6.7 and later · before 6.7.12
- linux linux kernel6.8 and later · before 6.8.3
- linux linux kernel6.2 and later · before 6.6.24
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- 4.11affected
- 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e and later · before d85c11c97ecf92d47a4b29e3faca714dc1f18d0daffected · git
- 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e and later · before 2da5568ee222ce0541bfe446a07998f92ed1643eaffected · git
- 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e and later · before 1ede7f1d7eed1738d1b9333fd1e152ccb450b86aaffected · git
- 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e and later · before 0f98f6d2fb5fad00f8299b84b85b6bc1b6d7d19aaffected · git
- 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e and later · before 3ce4c4c653e4e478ecb15d3c88e690f12cbf6b39affected · git
- 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e and later · before 363d17e7f7907c8e27a9e86968af0eaa2301787baffected · git
- 7c00bafee87c7bac7ed9eced7c161f8e5332cb4e and later · before 82b1c07a0af603e3c47b906c8e991dc96f01688eaffected · git
- before 4.11not affected · semver
- 5.10.215 and later · up to and including 5.10.*not affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | before 6.1.85-1 | 6.1.85-1 |
| Debian:13 | linux | before 6.7.12-1 | 6.7.12-1 |
| Red Hat:rhel_eus:9.4::appstream | bpftool-debuginfo | before 0:7.3.0-427.55.1.el9_4 | 0:7.3.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-64k-debug-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-64k-debug-devel | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-64k-debug-devel-matched | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-64k-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-64k-devel | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-64k-devel-matched | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debug-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debug-devel | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debug-devel-matched | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debuginfo-common-aarch64 | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debuginfo-common-ppc64le | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debuginfo-common-s390x | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-debuginfo-common-x86_64 | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-devel | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-devel-matched | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-doc | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-rt-debug-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-rt-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-tools-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
| Red Hat:rhel_eus:9.4::appstream | kernel-zfcpdump-debuginfo | before 0:5.14.0-427.55.1.el9_4 | 0:5.14.0-427.55.1.el9_4 |
+56
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
Published before and after this one in the same product
- ← EarlierCVE-2024-26957May 1, 2024 · s390/zcrypt: fix reference counting on zcrypt card objects31Monitor
- ← EarlierCVE-2024-26958May 1, 2024 · nfs: fix UAF in direct writes31Monitor
- Later →CVE-2024-26961May 1, 2024 · mac802154: fix llsec key resources release in mac802154_llsec_key_del31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 0f98f6d2fb5fad00f8299b84b85b6bc1b6d7d19a | Vendor (CNA) |
| Linux Linux | 1ede7f1d7eed1738d1b9333fd1e152ccb450b86a | Vendor (CNA) |
| Linux Linux | 2da5568ee222ce0541bfe446a07998f92ed1643e | Vendor (CNA) |
| Linux Linux | 363d17e7f7907c8e27a9e86968af0eaa2301787b | Vendor (CNA) |
| Linux Linux | 3ce4c4c653e4e478ecb15d3c88e690f12cbf6b39 | Vendor (CNA) |
| Linux Linux | 82b1c07a0af603e3c47b906c8e991dc96f01688e | Vendor (CNA) |
| Linux Linux | d85c11c97ecf92d47a4b29e3faca714dc1f18d0d | Vendor (CNA) |
| debian:linux | 6.1.85-1 · Debian:12 | Package registry (OSV) |
| red hat:bpftool-debuginfo | 0:7.3.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-64k-debug-debuginfo | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-64k-debug-devel | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-64k-debug-devel-matched | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-64k-debuginfo | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-64k-devel | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-64k-devel-matched | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-debug-debuginfo | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-debug-devel | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-debug-devel-matched | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-debuginfo | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:kernel-debuginfo-common-aarch64 | 0:5.14.0-427.55.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-24-0494 · May 16, 2024(Linux Kernel Güncellemesi)
- TR-24-0387 · May 2, 2024(Linux Kernel Güncellemesi)
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (8 more)Show less
- git.kernel.org/stable/c/1ede7f1d7eed1738d1b9333fd1e152ccb450b86a
- git.kernel.org/stable/c/2da5568ee222ce0541bfe446a07998f92ed1643e
- git.kernel.org/stable/c/363d17e7f7907c8e27a9e86968af0eaa2301787b
- git.kernel.org/stable/c/3ce4c4c653e4e478ecb15d3c88e690f12cbf6b39
- git.kernel.org/stable/c/82b1c07a0af603e3c47b906c8e991dc96f01688e
- git.kernel.org/stable/c/d85c11c97ecf92d47a4b29e3faca714dc1f18d0d
- lists.debian.org/debian-lts-announce/2024/06/msg00017.html
- cert-portal.siemens.com/productcert/html/ssa-265688.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.