Skip to content
Fencer Vulns
high 7.3

CVE-2026-23161 json

mm/shmem, swap: fix race of truncate and swap entry split

published 2026-02-14 8 mo ago modified 2026-08-05 3 mo ago also EUVD-2026-5877

cvss
7.3
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 0%
public exploits
0
none known

Summary

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

mm/shmem, swap: fix race of truncate and swap entry split

The helper for shmem swap freeing is not handling the order of swap entries correctly. It uses xa_cmpxchg_irq to erase the swap entry, but it gets the entry order before that using xa_get_order without lock protection, and it may get an outdated order value if the entry is split or changed in other ways after the xa_get_order and before the xa_cmpxchg_irq.

And besides, the order could grow and be larger than expected, and cause truncation to erase data beyond the end border. For example, if the target entry and following entries are swapped in or freed, then a large folio was added in place and swapped out, using the same entry, the xa_cmpxchg_irq will still succeed, it's very unlikely to happen though.

To fix that, open code the Xarray cmpxchg and put the order retrieval and value checking in the same critical section. Also, ensure the order won't exceed the end border, skip it if the entry goes across the border.

Skipping large swap entries crosses the end border is safe here. Shmem truncate iterates the range twice, in the first iteration, find_lock_entries already filtered such entries, and shmem will swapin the entries that cross the end border and partially truncate the folio (split the folio or at least zero part of it). So in the second loop here, if we see a swap entry that crosses the end order, it must at least have its content erased already.

I observed random swapoff hangs and kernel panics when stress testing ZSWAP with shmem. After applying this patch, all problems are gone.

Patch / fix

  • Linux Linux 6.12.69, 6.18.9, 6.19
  • linux Debian 13 6.12.69-1
  • linux Debian 14 6.18.9-1

debian advisories DEBIAN-CVE-2026-23161

  • linux-gcp-6.17 Ubuntu 24.04 LTS 6.17.0-1021.24~24.04.1
  • linux-hwe-6.17 Ubuntu 24.04 LTS 6.17.0-41.41~24.04.1
  • linux-oem-6.17 Ubuntu 24.04 LTS 6.17.0-1030.30
  • linux-azure-6.17 Ubuntu 24.04 LTS 6.17.0-1021.21~24.04.1
  • linux-nvidia-6.17 Ubuntu 24.04 LTS 6.17.0-1031.31
  • linux-oracle-6.17 Ubuntu 24.04 LTS 6.17.0-1019.19~24.04.3
  • linux-realtime-6.17 Ubuntu Pro Realtime 24.04 LTS 6.17.0-1018.20~24.04.1

ubuntu advisories UBUNTU-CVE-2026-23161

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel-livepatch-SLE16_Update_1 SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 15-160000.1.1
  • kernel-livepatch-SLE16_Update_3 SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 12-160000.1.1
  • kernel-livepatch-SLE16_Update_0 SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 17-160000.4.3
  • kernel-livepatch-SLE16_Update_2 SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 13-160000.1.1
  • kernel-livepatch-SLE16_Update_4 SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 11-160000.1.1
  • kernel-livepatch-SLE16_Update_5 SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 10-160000.1.1
  • kernel-livepatch-SLE16-RT_Update_5 Linux Micro 6.2 10-160000.1.1
  • kernel-livepatch-SLE16-RT_Update_4 Linux Micro 6.2 11-160000.1.1

suse advisories SUSE-SU-2026:23296-1SUSE-SU-2026:23343-1SUSE-SU-2026:23291-1SUSE-SU-2026:23339-1SUSE-SU-2026:23293-1SUSE-SU-2026:23341-1

  • kernel-rt openSUSE Leap 16.0 6.12.0-160000.27.1
  • dtb-aarch64 openSUSE Leap 16.0 6.12.0-160000.27.1
  • kernel-64kb openSUSE Leap 16.0 6.12.0-160000.27.1
  • kernel-syms openSUSE Leap 16.0 6.12.0-160000.27.1
  • kernel-azure openSUSE Leap 16.0 6.12.0-160000.27.1
  • kernel-obs-qa openSUSE Leap 16.0 6.12.0-160000.27.1
  • kernel-source openSUSE Leap 16.0 6.12.0-160000.27.1
  • kernel-default openSUSE Leap 16.0 6.12.0-160000.27.1

opensuse advisories openSUSE-SU-2026:20416-1

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-2026-23161 updated cvss 5.5

kernel: mm/shmem, swap: fix race of truncate and swap entry split

  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 10 kernel
    affected: no fix available “Fix deferred”
  • Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more
    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

Exploit prediction

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

CVSS scores

assigned by version score vector
CNA 3.1 7.3 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/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.