Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2024-26759

published high CVSS 3.1 · 7.8

mm/swap: fix race when skipping swapcache

Published
03 Apr 2024, 17:00:43 UTC
Updated
05 Aug 2026, 11:27:02 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < 2dedda77d4493f3e92e414b272bfa60f1f51ed95 · 0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < 305152314df82b22cf9b181f3dc5fc411002079a · 0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < d183a4631acfc7af955c02a02e739cec15f5234d · 0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < 13ddaf26be324a7f951891ecd9ccd04466d27458 · Other versions: unaffected Affected Not stated Linux
Linux — Linux4.15 (affected) · 0 to < 4.15 (unaffected · semver) · 6.1.80 through 6.1.* (unaffected · semver) · 6.6.19 through 6.6.* (unaffected · semver) · 6.7.7 through 6.7.* (unaffected · semver) · 6.8 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Pending Fix; Not Affected Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2024-784 Fixed Not stated Amazon Linux assessment
AlmaLinux 8 bpftool Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
Oracle Linux 8 bpftoolaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
AlmaLinux 8 kernel Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-abi-stablelists Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
Show 96 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
AlmaLinux 8 kernel-core Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-cross-headers Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-debug Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-debug-core Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-debug-devel Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-debug-modules Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-debug-modules-extra Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-devel Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-doc Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-headers Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-modules Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-modules-extra Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-rt Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-core Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-debug Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-debug-core Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-debug-devel Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-debug-kvm Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-debug-modules Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-debug-modules-extra Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-devel Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-kvm Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-modules Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-rt-modules-extra Advisory build 4.18.0-553.8.1.rt7.349.el8_10 ALSA-2024:4352
AlmaLinux 8 kernel-tools Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-tools-libs Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-tools-libs-devel Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-zfcpdump Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-zfcpdump-core Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-zfcpdump-devel Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-zfcpdump-modules Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 kernel-zfcpdump-modules-extra Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 perf Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
AlmaLinux 8 python3-perf Advisory build 4.18.0-553.8.1.el8_10 ALSA-2024:4211
Oracle Linux 8 bpftoolx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernelx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-abi-stablelistsx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-corex86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-cross-headersaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-cross-headersx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-debugx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-debug-corex86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-debug-develx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-debug-modulesx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-debug-modules-extrax86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-develx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-docx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-headersaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-headersx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-modulesx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-modules-extrax86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-toolsaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-toolsx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-tools-libsaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-tools-libsx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-tools-libs-develaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 kernel-tools-libs-develx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 perfaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 perfx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 python3-perfaarch64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 8 python3-perfx86_64 Advisory build 0:4.18.0-553.8.1.el8_10 ELSA-2024-4211
Oracle Linux 9 bpftoolaarch64 Advisory build 0:7.4.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 bpftoolx86_64 Advisory build 0:7.4.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernelx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-abi-stablelistsx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-corex86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-cross-headersaarch64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-cross-headersx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debugx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debug-corex86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debug-develx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debug-devel-matchedx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debug-modulesx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debug-modules-corex86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debug-modules-extrax86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-debug-uki-virtx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-develx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-devel-matchedx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-docx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-headersaarch64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-headersx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-modulesx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-modules-corex86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-modules-extrax86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-toolsaarch64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-toolsx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-tools-libsaarch64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-tools-libsx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-tools-libs-develaarch64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-tools-libs-develx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-uki-virtx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 kernel-uki-virt-addonsx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 libperfaarch64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 libperfx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 perfaarch64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315
Oracle Linux 9 perfx86_64 Advisory build 0:5.14.0-503.11.1.el9_5 ELSA-2024-9315

Package entries are limited to the first 100 builds and 100 linked advisories.

Description

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) [[email protected]: v4]

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

28

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The race is reached through ordinary page faults on the attacker's own swapped-out anonymous memory (`handle_mm_fault() → do_swap_page()`), requiring the ability to execute code on the machine. There is no network-reachable path into the swapin fast path. AC:L - The attacker controls both sides of the race — the threads faulting on the same swap entry and the thread forcing swapout via `madvise(MADV_PAGEOUT)` — and can widen the window arbitrarily because `vma_alloc_folio()` and `mem_cgroup_swapin_charge_folio(GFP_KERNEL)` sit between the `__swap_count()` check and `swap_read_folio()` and block in direct reclaim under attacker-created memory pressure. The upstream reproducer triggers data loss within minutes on stock 6.8. PR:L - Only the ability to run unprivileged code is needed: mmap anonymous memory, spawn threads, and call `madvise()`. No capabilities, no user namespace, and no privileged device access are involved. UI:N - The attacker's own threads drive the entire sequence through page faults and madvise; no action by any other user is required. S:U - The corruption is confined to memory managed by the kernel's own security authority — page tables and swap slots — with no crossing of a hypervisor, IOMMU, or other authority boundary. C:H - The unpinned `swap_read_folio()` is a use-after-free read of a swap slot that may already have been reallocated from the global swap pool to another task, so another user's swapped-out anonymous/shmem page content can be read in and mapped into the racing address space; installing a stale folio also resurrects page content that had already been overwritten or sanitized in memory. I:H - The ABA defeats the `pte_same()` guard and installs a stale or foreign page into a live PTE, silently destroying committed writes and rolling back arbitrary anonymous memory to an earlier state — an undetectable corruption primitive over any process's data, including security-relevant in-memory state. A:H - Silent corruption of arbitrary anonymous pages under memory pressure crashes or hangs the affected processes, and corrupted state flushed to persistent storage by system services propagates the failure; the swap-slot use-after-free additionally leaves swap accounting and page content inconsistent.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < 2dedda77d4493f3e92e414b272bfa60f1f51ed95 (affected · git)0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < 305152314df82b22cf9b181f3dc5fc411002079a (affected · git)0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < d183a4631acfc7af955c02a02e739cec15f5234d (affected · git)0bcac06f27d7528591c27ac2b093ccd71c5d0168 to < 13ddaf26be324a7f951891ecd9ccd04466d27458 (affected · git)Default: unaffected Linux · cna
Linux Linux 4.15 (affected)0 to < 4.15 (unaffected · semver)6.1.80 through 6.1.* (unaffected · semver)6.6.19 through 6.6.* (unaffected · semver)6.7.7 through 6.7.* (unaffected · semver)6.8 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

4

Provider assertions

3

Linux · cna

mm/swap: fix race when skipping swapcache

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
0a37674db6ecb5dfa1639df0a5004cac73e3cee9b04e9af8790b299be9e4a2eb
Ingested
23 Sep 2026, 08:20:34 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected