Skip to content
Fencer Vulns
high 7.8

CVE-2023-53178 json

mm: fix zswap writeback race condition

published 2025-09-15 13 mo ago modified 2026-08-05 3 mo ago also EUVD-2023-59798

cvss
7.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.1%
EPSS 0.1% chance of exploitation in 30 days, percentile 1%
public exploits
0
none known

Summary

In the Linux kernel, the following vulnerability has been resolved:

mm: fix zswap writeback race condition

The zswap writeback mechanism can cause a race condition resulting in memory corruption, where a swapped out page gets swapped in with data that was written to a different page.

The race unfolds like this: 1. a page with data A and swap offset X is stored in zswap 2. page A is removed off the LRU by zpool driver for writeback in zswap-shrink work, data for A is mapped by zpool driver 3. user space program faults and invalidates page entry A, offset X is considered free 4. kswapd stores page B at offset X in zswap (zswap could also be full, if so, page B would then be IOed to X, then skip step 5.) 5. entry A is replaced by B in tree->rbroot, this doesn't affect the local reference held by zswap-shrink work 6. zswap-shrink work writes back A at X, and frees zswap entry A 7. swapin of slot X brings A in memory instead of B

The fix: Once the swap page cache has been allocated (case ZSWAP_SWAPCACHE_NEW), zswap-shrink work just checks that the local zswap_entry reference is still the same as the one in the tree. If it's not the same it means that it's either been invalidated or replaced, in both cases the writeback is aborted because the local entry contains stale data.

Reproducer: I originally found this by running `stress` overnight to validate my work on the zswap writeback mechanism, it manifested after hours on my test machine. The key to make it happen is having zswap writebacks, so whatever setup pumps /sys/kernel/debug/zswap/written_back_pages should do the trick.

In order to reproduce this faster on a vm, I setup a system with ~100M of available memory and a 500M swap file, then running `stress --vm 1 --vm-bytes 300000000 --vm-stride 4000` makes it happen in matter of tens of minutes. One can speed things up even more by swinging /sys/module/zswap/parameters/max_pool_percent up and down between, say, 20 and 1; this makes it reproduce in tens of seconds. It's crucial to set `--vm-stride` to something other than 4096 otherwise `stress` won't realize that memory has been corrupted because all pages would have the same data.

Patch / fix

  • Linux Linux 6.1.30, 6.3.4, 6.4
  • linux Debian 12 6.1.37-1
  • linux Debian 14, Debian 13 6.3.7-1

debian advisories DEBIAN-CVE-2023-53178

  • kernel RHEL 8 4.18.0-553.83.1.el8_10
  • perf RHEL 8 4.18.0-553.83.1.el8_10
  • bpftool RHEL 8 4.18.0-553.83.1.el8_10
  • kernel-core RHEL 8 4.18.0-553.83.1.el8_10
  • kernel-tools RHEL 8 4.18.0-553.83.1.el8_10
  • python3-perf RHEL 8 4.18.0-553.83.1.el8_10
  • kernel-modules RHEL 8 4.18.0-553.83.1.el8_10
  • kernel-zfcpdump RHEL 8 4.18.0-553.83.1.el8_10

red hat advisories RHSA-2025:23960RHSA-2025:23947RHSA-2025:23445RHSA-2025:22752RHSA-2025:21136RHSA-2025:21128

  • kernel-rt SLE Micro 5.4, SLE Micro 5.3 5.14.21-150400.15.145.1
  • kernel-source-rt SLE Micro 5.4, SLE Micro 5.3 5.14.21-150400.15.145.1
  • kernel-64kb SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS, SLE High Performance Computing 15 SP4-ESPOS 5.14.21-150400.24.194.1
  • kernel-syms SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +1 more 5.14.21-150400.24.194.1
  • kernel-source SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +1 more 5.14.21-150400.24.194.1
  • kernel-default SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Micro 5.4 +5 more 5.14.21-150400.24.194.1
  • kernel-obs-build SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE High Performance Computing 15 SP4-LTSS +1 more 5.14.21-150400.24.194.1
  • kernel-default-base SLES for SAP 15 SP4, SLES 15 SP4-LTSS, SLE Micro 5.4 +3 more 5.14.21-150400.24.194.1.150400.24.98.3

suse advisories SUSE-SU-2026:1131-1SUSE-SU-2026:0617-1SUSE-SU-2026:0496-1SUSE-SU-2026:0495-1SUSE-SU-2026:0475-1SUSE-SU-2026:0474-1

  • kernel AlmaLinux 8 4.18.0-553.83.1.el8_10
  • perf AlmaLinux 8 4.18.0-553.83.1.el8_10
  • bpftool AlmaLinux 8 4.18.0-553.83.1.el8_10
  • kernel-core AlmaLinux 8 4.18.0-553.83.1.el8_10
  • kernel-tools AlmaLinux 8 4.18.0-553.83.1.el8_10
  • python3-perf AlmaLinux 8 4.18.0-553.83.1.el8_10
  • kernel-modules AlmaLinux 8 4.18.0-553.83.1.el8_10
  • kernel-zfcpdump AlmaLinux 8 4.18.0-553.83.1.el8_10

almalinux advisories ALSA-2025:19931ALSA-2025:19932

  • kernel-rt Rocky Linux 8 4.18.0-553.83.1.rt7.424.el8_10
  • kernel Rocky Linux 8 4.18.0-553.83.1.el8_10

rocky linux advisories RLSA-2025:19932RLSA-2025:19931

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-53178 updated cvss 7.3

kernel: mm: fix zswap writeback race condition

  • Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 more
    affected: no fix available
  • Red Hat CodeReady Linux Builder (v. 9) libperf 5.14.0-503.11.1.el9_5, kernel-debuginfo-common-s390x 5.14.0-503.11.1.el9_5, kernel-debuginfo-common-x86_64 5.14.0-503.11.1.el9_5, kernel-debuginfo-common-aarch64 5.14.0-503.11.1.el9_5, kernel-debuginfo-common-ppc64le 5.14.0-503.11.1.el9_5
    fixed: vendor fix RHSA-2024:9315
  • Red Hat CodeReady Linux Builder EUS (v.9.4) libperf 5.14.0-427.97.1.el9_4, kernel-debuginfo-common-s390x 5.14.0-427.97.1.el9_4, kernel-debuginfo-common-x86_64 5.14.0-427.97.1.el9_4, kernel-debuginfo-common-aarch64 5.14.0-427.97.1.el9_4, kernel-debuginfo-common-ppc64le 5.14.0-427.97.1.el9_4
    fixed: vendor fix RHSA-2025:19886
  • Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-503.11.1.el9_5, perf 5.14.0-503.11.1.el9_5, rtla 5.14.0-503.11.1.el9_5, kernel-devel-matched 5.14.0-503.11.1.el9_5, kernel-64k-devel-matched 5.14.0-503.11.1.el9_5, kernel-debug-devel-matched 5.14.0-503.11.1.el9_5, +6 more
    fixed: vendor fix RHSA-2024:9315
  • Red Hat Enterprise Linux AppStream E4S (v.9.0) perf 5.14.0-70.153.1.el9_0, kernel-devel-matched 5.14.0-70.153.1.el9_0, kernel-debug-devel-matched 5.14.0-70.153.1.el9_0, kernel-debuginfo-common-s390x 5.14.0-70.153.1.el9_0, kernel-zfcpdump-devel-matched 5.14.0-70.153.1.el9_0, kernel-debuginfo-common-x86_64 5.14.0-70.153.1.el9_0, +2 more
    fixed: vendor fix RHSA-2025:21091
  • Red Hat Enterprise Linux AppStream E4S (v.9.2) perf 5.14.0-284.146.1.el9_2, rtla 5.14.0-284.146.1.el9_2, kernel-devel-matched 5.14.0-284.146.1.el9_2, kernel-64k-devel-matched 5.14.0-284.146.1.el9_2, kernel-debug-devel-matched 5.14.0-284.146.1.el9_2, kernel-debuginfo-common-s390x 5.14.0-284.146.1.el9_2, +5 more
    fixed: vendor fix RHSA-2025:21051
  • Red Hat Enterprise Linux AppStream EUS (v.9.4) rv 5.14.0-427.97.1.el9_4, perf 5.14.0-427.97.1.el9_4, rtla 5.14.0-427.97.1.el9_4, kernel-devel-matched 5.14.0-427.97.1.el9_4, kernel-64k-devel-matched 5.14.0-427.97.1.el9_4, kernel-debug-devel-matched 5.14.0-427.97.1.el9_4, +6 more
    fixed: vendor fix RHSA-2025:19886
  • Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-553.83.1.el8_10, kernel 4.18.0-553.83.1.el8_10, bpftool 4.18.0-553.83.1.el8_10, kernel-core 4.18.0-553.83.1.el8_10, kernel-tools 4.18.0-553.83.1.el8_10, python3-perf 4.18.0-553.83.1.el8_10, +15 more
    fixed: vendor fix RHSA-2025:19931
show 25 more
  • Red Hat Enterprise Linux BaseOS (v. 9) bpftool 7.4.0-503.11.1.el9_5, kernel 5.14.0-503.11.1.el9_5, kernel-64k 5.14.0-503.11.1.el9_5, kernel-core 5.14.0-503.11.1.el9_5, kernel-tools 5.14.0-503.11.1.el9_5, python3-perf 5.14.0-503.11.1.el9_5, +29 more
    fixed: vendor fix RHSA-2024:9315
  • Red Hat Enterprise Linux BaseOS AUS (v. 8.2) perf 4.18.0-193.178.1.el8_2, kernel 4.18.0-193.178.1.el8_2, bpftool 4.18.0-193.178.1.el8_2, kernel-core 4.18.0-193.178.1.el8_2, kernel-tools 4.18.0-193.178.1.el8_2, python3-perf 4.18.0-193.178.1.el8_2, +8 more
    fixed: vendor fix RHSA-2025:23445
  • Red Hat Enterprise Linux BaseOS AUS (v.8.4) perf 4.18.0-305.179.1.el8_4, kernel 4.18.0-305.179.1.el8_4, bpftool 4.18.0-305.179.1.el8_4, kernel-core 4.18.0-305.179.1.el8_4, kernel-tools 4.18.0-305.179.1.el8_4, python3-perf 4.18.0-305.179.1.el8_4, +8 more
    fixed: vendor fix RHSA-2025:22752
  • Red Hat Enterprise Linux BaseOS AUS (v.8.6) perf 4.18.0-372.168.1.el8_6, kernel 4.18.0-372.168.1.el8_6, bpftool 4.18.0-372.168.1.el8_6, kernel-core 4.18.0-372.168.1.el8_6, kernel-tools 4.18.0-372.168.1.el8_6, python3-perf 4.18.0-372.168.1.el8_6, +8 more Red Hat Enterprise Linux BaseOS E4S (v.8.6) perf 4.18.0-372.168.1.el8_6, kernel 4.18.0-372.168.1.el8_6, bpftool 4.18.0-372.168.1.el8_6, kernel-core 4.18.0-372.168.1.el8_6, kernel-tools 4.18.0-372.168.1.el8_6, python3-perf 4.18.0-372.168.1.el8_6, +15 more
    fixed: vendor fix RHSA-2025:21084
  • Red Hat Enterprise Linux BaseOS E4S (v.8.8) perf 4.18.0-477.118.1.el8_8, kernel 4.18.0-477.118.1.el8_8, bpftool 4.18.0-477.118.1.el8_8, kernel-core 4.18.0-477.118.1.el8_8, kernel-tools 4.18.0-477.118.1.el8_8, python3-perf 4.18.0-477.118.1.el8_8, +9 more
    fixed: vendor fix RHSA-2025:21083
  • Red Hat Enterprise Linux BaseOS E4S (v.9.0) kernel 5.14.0-70.153.1.el9_0, bpftool 5.14.0-70.153.1.el9_0, kernel-core 5.14.0-70.153.1.el9_0, kernel-tools 5.14.0-70.153.1.el9_0, python3-perf 5.14.0-70.153.1.el9_0, kernel-modules 5.14.0-70.153.1.el9_0, +14 more
    fixed: vendor fix RHSA-2025:21091
  • Red Hat Enterprise Linux BaseOS E4S (v.9.2) bpftool 7.0.0-284.146.1.el9_2, kernel 5.14.0-284.146.1.el9_2, kernel-64k 5.14.0-284.146.1.el9_2, kernel-core 5.14.0-284.146.1.el9_2, kernel-tools 5.14.0-284.146.1.el9_2, python3-perf 5.14.0-284.146.1.el9_2, +28 more
    fixed: vendor fix RHSA-2025:21051
  • Red Hat Enterprise Linux BaseOS EUS (v.9.4) bpftool 7.3.0-427.97.1.el9_4, kernel 5.14.0-427.97.1.el9_4, kernel-64k 5.14.0-427.97.1.el9_4, kernel-core 5.14.0-427.97.1.el9_4, kernel-tools 5.14.0-427.97.1.el9_4, python3-perf 5.14.0-427.97.1.el9_4, +28 more
    fixed: vendor fix RHSA-2025:19886
  • Red Hat Enterprise Linux BaseOS EUS EXTENSION (v.8.4) perf 4.18.0-305.179.1.el8_4, kernel 4.18.0-305.179.1.el8_4, bpftool 4.18.0-305.179.1.el8_4, kernel-core 4.18.0-305.179.1.el8_4, kernel-tools 4.18.0-305.179.1.el8_4, python3-perf 4.18.0-305.179.1.el8_4, +8 more
    fixed: vendor fix RHSA-2025:22752
  • Red Hat Enterprise Linux BaseOS TUS (v.8.6) perf 4.18.0-372.168.1.el8_6, kernel 4.18.0-372.168.1.el8_6, bpftool 4.18.0-372.168.1.el8_6, kernel-core 4.18.0-372.168.1.el8_6, kernel-tools 4.18.0-372.168.1.el8_6, python3-perf 4.18.0-372.168.1.el8_6, +8 more
    fixed: vendor fix RHSA-2025:21084
  • Red Hat Enterprise Linux BaseOS TUS (v.8.8) perf 4.18.0-477.118.1.el8_8, kernel 4.18.0-477.118.1.el8_8, bpftool 4.18.0-477.118.1.el8_8, kernel-core 4.18.0-477.118.1.el8_8, kernel-tools 4.18.0-477.118.1.el8_8, python3-perf 4.18.0-477.118.1.el8_8, +8 more
    fixed: vendor fix RHSA-2025:21083
  • Red Hat Enterprise Linux CRB (v. 8) kernel-debuginfo-common-x86_64 4.18.0-553.83.1.el8_10, kernel-debuginfo-common-aarch64 4.18.0-553.83.1.el8_10, kernel-debuginfo-common-ppc64le 4.18.0-553.83.1.el8_10
    fixed: vendor fix RHSA-2025:19931
  • Red Hat Enterprise Linux for Real Time (v. 7 ELS) kernel-rt 3.10.0-1160.144.1.rt56.1296.el7, kernel-rt-trace 3.10.0-1160.144.1.rt56.1296.el7, kernel-rt-debuginfo-common-x86_64 3.10.0-1160.144.1.rt56.1296.el7
    fixed: vendor fix RHSA-2025:23960
  • Red Hat Enterprise Linux NFV (v. 8) kernel-rt 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-kvm 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-core 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-modules 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-debug-kvm 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-debug-core 4.18.0-553.83.1.rt7.424.el8_10, +4 more
    fixed: vendor fix RHSA-2025:19932
  • Red Hat Enterprise Linux NFV E4S (v.9.0) kernel-rt 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-kvm 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-core 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-modules 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-debug-kvm 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-debug-core 5.14.0-70.153.1.rt21.225.el9_0, +4 more
    fixed: vendor fix RHSA-2025:21136
  • Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-503.11.1.el9_5, kernel-rt-core 5.14.0-503.11.1.el9_5, kernel-rt-modules 5.14.0-503.11.1.el9_5, kernel-rt-debug-core 5.14.0-503.11.1.el9_5, kernel-rt-modules-core 5.14.0-503.11.1.el9_5, kernel-rt-debug-modules 5.14.0-503.11.1.el9_5, +4 more
    fixed: vendor fix RHSA-2024:9315
  • Red Hat Enterprise Linux Real Time E4S (v.9.0) kernel-rt 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-core 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-modules 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-debug-core 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-debug-modules 5.14.0-70.153.1.rt21.225.el9_0, kernel-rt-modules-extra 5.14.0-70.153.1.rt21.225.el9_0, +2 more
    fixed: vendor fix RHSA-2025:21136
  • Red Hat Enterprise Linux Real Time E4S (v.9.2) kernel-rt 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-core 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-modules 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-debug-core 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-modules-core 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-debug-modules 5.14.0-284.146.1.rt14.431.el9_2, +4 more
    fixed: vendor fix RHSA-2025:21128
  • Red Hat Enterprise Linux Real Time EUS (v.9.4) kernel-rt 5.14.0-427.97.1.el9_4, kernel-rt-core 5.14.0-427.97.1.el9_4, kernel-rt-modules 5.14.0-427.97.1.el9_4, kernel-rt-debug-core 5.14.0-427.97.1.el9_4, kernel-rt-modules-core 5.14.0-427.97.1.el9_4, kernel-rt-debug-modules 5.14.0-427.97.1.el9_4, +4 more
    fixed: vendor fix RHSA-2025:19886
  • Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-503.11.1.el9_5, kernel-rt-kvm 5.14.0-503.11.1.el9_5, kernel-rt-core 5.14.0-503.11.1.el9_5, kernel-rt-modules 5.14.0-503.11.1.el9_5, kernel-rt-debug-kvm 5.14.0-503.11.1.el9_5, kernel-rt-debug-core 5.14.0-503.11.1.el9_5, +6 more
    fixed: vendor fix RHSA-2024:9315
  • Red Hat Enterprise Linux Real Time for NFV E4S (v.9.2) kernel-rt 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-kvm 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-core 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-modules 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-debug-kvm 5.14.0-284.146.1.rt14.431.el9_2, kernel-rt-debug-core 5.14.0-284.146.1.rt14.431.el9_2, +6 more
    fixed: vendor fix RHSA-2025:21128
  • Red Hat Enterprise Linux Real Time for NFV EUS (v.9.4) kernel-rt 5.14.0-427.97.1.el9_4, kernel-rt-kvm 5.14.0-427.97.1.el9_4, kernel-rt-core 5.14.0-427.97.1.el9_4, kernel-rt-modules 5.14.0-427.97.1.el9_4, kernel-rt-debug-kvm 5.14.0-427.97.1.el9_4, kernel-rt-debug-core 5.14.0-427.97.1.el9_4, +6 more
    fixed: vendor fix RHSA-2025:19886
  • Red Hat Enterprise Linux RT (v. 8) kernel-rt 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-core 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-modules 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-debug-core 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-debug-modules 4.18.0-553.83.1.rt7.424.el8_10, kernel-rt-modules-extra 4.18.0-553.83.1.rt7.424.el8_10, +2 more
    fixed: vendor fix RHSA-2025:19932
  • Red Hat Enterprise Linux Server (v. 7 ELS) perf 3.10.0-1160.144.1.el7, kernel 3.10.0-1160.144.1.el7, bpftool 3.10.0-1160.144.1.el7, python-perf 3.10.0-1160.144.1.el7, kernel-kdump 3.10.0-1160.144.1.el7, kernel-tools 3.10.0-1160.144.1.el7, +7 more Red Hat Enterprise Linux Server Optional (v. 7 ELS) kernel-debuginfo-common-ppc64 3.10.0-1160.144.1.el7, kernel-debuginfo-common-x86_64 3.10.0-1160.144.1.el7, kernel-debuginfo-common-ppc64le 3.10.0-1160.144.1.el7
    fixed: vendor fix RHSA-2025:23947
  • Red Hat CodeReady Linux Builder (v. 9) kernel-cross-headers 5.14.0-503.11.1.el9_5 Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 10 kernel Red Hat Enterprise Linux AppStream (v. 9) kernel-headers 5.14.0-503.11.1.el9_5
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
4 mo ago

Exploit prediction

0.12% chance of exploitation in the next 30 days, higher than 1% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 4.7 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected products

  • Linux Linux

Classification

Weakness
  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.