CVE-2024-26759: mm/swap: fix race when skipping swapcache
Noroxi assessment
Priority: Monitor (action score 22/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.26% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 13ddaf26be324a7f951891ecd9ccd04466d27458, 2dedda77d4493f3e92e414b272bfa60f1f51ed95, 305152314df82b22cf9b181f3dc5fc411002079a.
- Severity is disputed: the assigning authority (CNA) scores it 7.8, NVD 5.5.
- Mentioned 1 time in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Low priority for now. Upgrade to Linux Linux 13ddaf26be324a7f951891ecd9ccd04466d27458, 2dedda77d4493f3e92e414b272bfa60f1f51ed95, 305152314df82b22cf9b181f3dc5fc411002079a 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 when skipping swapcache When skipping swapcache for SWP_SYNCHRONOUS_IO, if two or more threads swapin the same entry at the same time, they get different pages (A, B). Before one thread (T0) finishes the swapin and installs page (A) to the PTE, another thread (T1) could finish swapin of page (B), swap_free the entry, then swap out the possibly modified page reusing the same entry. It breaks the pte_same check in (T0) because PTE value is unchanged, causing ABA problem. Thread (T0) will install a stalled page (A) into the PTE and cause data corruption. One possible callstack is like this: CPU0 CPU1 ---- ---- do_swap_page() do_swap_page() with same entry <direct swapin path> <direct swapin path> <alloc page A> <alloc page B> swap_read_folio() <- read to page A swap_read_folio() <- read to page B <slow on later locks or interrupt> <finished swapin first> ... set_pte_at() swap_free() <- entry is free <write to page B, now page A stalled> <swap out page B to same swap entry> pte_same() <- Check pass, PTE seems unchanged, but page A is stalled! swap_free() <- page B content lost! set_pte_at() <- staled page A installed! And besides, for ZRAM, swap_free() allows the swap device to discard the entry content, so even if page (B) is not modified, if swap_read_folio() on CPU0 happens later than swap_free() on CPU1, it may also cause data loss. To fix this, reuse swapcache_prepare which will pin the swap entry using the cache flag, and allow only one thread to swap it in, also prevent any parallel code from putting the entry in the cache. Release the pin after PT unlocked. Racers just loop and wait since it's a rare and very short event. A schedule_timeout_uninterruptible(1) call is added to avoid repeated page faults wasting too much CPU, causing livelock or adding too much noise to perf statistics. A similar livelock issue was described in commit 029c4628b2eb ("mm: swap: get rid of livelock in swapin readahead") Reproducer: This race issue can be triggered easily using a well constructed reproducer and patched brd (with a delay in read path) [1]: With latest 6.8 mainline, race caused data loss can be observed easily: $ gcc -g -lpthread test-thread-swap-race.c && ./a.out Polulating 32MB of memory region... Keep swapping out... Starting round 0... Spawning 65536 workers... 32746 workers spawned, wait for done... Round 0: Error on 0x5aa00, expected 32746, got 32743, 3 data loss! Round 0: Error on 0x395200, expected 32746, got 32743, 3 data loss! Round 0: Error on 0x3fd000, expected 32746, got 32737, 9 data loss! Round 0 Failed, 15 data loss! This reproducer spawns multiple threads sharing the same memory region using a small swap device. Every two threads updates mapped pages one by one in opposite direction trying to create a race, with one dedicated thread keep swapping out the data out using madvise. The reproducer created a reproduce rate of about once every 5 minutes, so the race should be totally possible in production. After this patch, I ran the reproducer for over a few hundred rounds and no data loss observed. Performance overhead is minimal, microbenchmark swapin 10G from 32G zram: Before: 10934698 us After: 11157121 us Cached: 13155355 us (Dropping SWP_SYNCHRONOUS_IO flag) [kasong@tencent.com: v4]
- Published
- Apr 3, 2024
- Updated
- Aug 5, 2026
- EPSS
- 0.2% · 18th percentile
- CWE
- CWE-787
Report tools
Action score
22
Monitor
Low priority for now.
- CVSS
- 22 / 40 · 5.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.2%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 5.5
- CNA · Linux
- 7.8
- 2.3 point gap
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
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.
Is your version affected? Check itNoroxi 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 |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel4.15 and later · before 6.1.80
- linux linux kernel6.2 and later · before 6.6.19
- linux linux kernel6.7 and later · before 6.7.7
- linux linux kernel6.8
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.15affected
- 0bcac06f27d7528591c27ac2b093ccd71c5d0168 and later · before 2dedda77d4493f3e92e414b272bfa60f1f51ed95affected · git
- 0bcac06f27d7528591c27ac2b093ccd71c5d0168 and later · before 305152314df82b22cf9b181f3dc5fc411002079aaffected · git
- 0bcac06f27d7528591c27ac2b093ccd71c5d0168 and later · before d183a4631acfc7af955c02a02e739cec15f5234daffected · git
- 0bcac06f27d7528591c27ac2b093ccd71c5d0168 and later · before 13ddaf26be324a7f951891ecd9ccd04466d27458affected · git
- before 4.15not affected · semver
- 6.1.80 and later · up to and including 6.1.*not affected · semver
- 6.6.19 and later · up to and including 6.6.*not affected · semver
- 6.7.7 and later · up to and including 6.7.*not affected · semver
- 6.8 and laternot affected · original_commit_for_fix
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.82-1 | 6.1.82-1 |
| Debian:13 | linux | before 6.7.7-1 | 6.7.7-1 |
| openSUSE:Leap 15.5 | kernel-azure | before 5.14.21-150500.33.69.1 | 5.14.21-150500.33.69.1 |
| openSUSE:Leap 15.5 | kernel-rt_debug | before 5.14.21-150500.13.73.1 | 5.14.21-150500.13.73.1 |
| openSUSE:Leap 15.5 | kernel-source-azure | before 5.14.21-150500.33.69.1 | 5.14.21-150500.33.69.1 |
| openSUSE:Leap 15.5 | kernel-source-rt | before 5.14.21-150500.13.73.1 | 5.14.21-150500.13.73.1 |
| openSUSE:Leap 15.5 | kernel-syms-azure | before 5.14.21-150500.33.69.1 | 5.14.21-150500.33.69.1 |
| openSUSE:Leap 15.5 | kernel-syms-rt | before 5.14.21-150500.13.73.1 | 5.14.21-150500.13.73.1 |
| openSUSE:Leap 15.6 | dtb-aarch64 | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
| openSUSE:Leap 15.6 | kernel-64kb | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
| openSUSE:Leap 15.6 | kernel-azure | before 6.4.0-150600.8.14.1 | 6.4.0-150600.8.14.1 |
| openSUSE:Leap 15.6 | kernel-debug | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
| openSUSE:Leap 15.6 | kernel-default | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
| openSUSE:Leap 15.6 | kernel-default-base | before 6.4.0-150600.23.25.1.150600.12.10.2 | 6.4.0-150600.23.25.1.150600.12.10.2 |
| openSUSE:Leap 15.6 | kernel-docs | before 6.4.0-150600.23.25.2 | 6.4.0-150600.23.25.2 |
| openSUSE:Leap 15.6 | kernel-kvmsmall | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
| openSUSE:Leap 15.6 | kernel-obs-build | before 6.4.0-150600.23.25.2 | 6.4.0-150600.23.25.2 |
| openSUSE:Leap 15.6 | kernel-obs-qa | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
| openSUSE:Leap 15.6 | kernel-rt | before 6.4.0-150600.10.14.1 | 6.4.0-150600.10.14.1 |
| openSUSE:Leap 15.6 | kernel-rt_debug | before 6.4.0-150600.10.14.1 | 6.4.0-150600.10.14.1 |
| openSUSE:Leap 15.6 | kernel-source | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
| openSUSE:Leap 15.6 | kernel-source-azure | before 6.4.0-150600.8.14.1 | 6.4.0-150600.8.14.1 |
| openSUSE:Leap 15.6 | kernel-source-rt | before 6.4.0-150600.10.14.1 | 6.4.0-150600.10.14.1 |
| openSUSE:Leap 15.6 | kernel-syms | before 6.4.0-150600.23.25.1 | 6.4.0-150600.23.25.1 |
+96
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-26757Apr 3, 2024 · md: Don't ignore read-only array in md_check_recovery()22Monitor
- ← EarlierCVE-2024-26758Apr 3, 2024 · md: Don't ignore suspended array in md_check_recovery()22Monitor
- Later →CVE-2024-26760Apr 3, 2024 · scsi: target: pscsi: Fix bio_put() for error case22Monitor
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 | 13ddaf26be324a7f951891ecd9ccd04466d27458 | Vendor (CNA) |
| Linux Linux | 2dedda77d4493f3e92e414b272bfa60f1f51ed95 | Vendor (CNA) |
| Linux Linux | 305152314df82b22cf9b181f3dc5fc411002079a | Vendor (CNA) |
| Linux Linux | d183a4631acfc7af955c02a02e739cec15f5234d | Vendor (CNA) |
| almalinux:bpftool | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-abi-stablelists | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-core | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-cross-headers | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-debug | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-debug-core | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-debug-devel | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-debug-modules | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-debug-modules-extra | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-devel | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:kernel-doc | 4.18.0-553.8.1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| debian:linux | 6.1.82-1 · Debian:12 | Package registry (OSV) |
| opensuse:dtb-aarch64 | 6.4.0-150600.23.25.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-64kb | 6.4.0-150600.23.25.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-azure | 6.4.0-150600.8.14.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-debug | 6.4.0-150600.23.25.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-default | 6.4.0-150600.23.25.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-default-base | 6.4.0-150600.23.25.1.150600.12.10.2 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-docs | 6.4.0-150600.23.25.2 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-kvmsmall | 6.4.0-150600.23.25.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-obs-build | 6.4.0-150600.23.25.2 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-obs-qa | 6.4.0-150600.23.25.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-source-azure | 6.4.0-150600.8.14.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:kernel-syms-azure | 6.4.0-150600.8.14.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| red hat:bpftool-debuginfo | 0:7.3.0-427.57.1.el9_4 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
+24
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-0265 · Apr 4, 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.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-787 · Out-of-bounds WriteCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.