CVE-2026-23161
High · 7.3CVSS
7.3
EPSS
0.1%
Published
Feb 14, 2026
CISA due date
—
Cloudanix analysis
A flaw in the Linux kernel's handling of shared memory and swap space can cause the system to crash or hang when certain memory operations happen at the same time.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Data Tampering
- Component
- OS kernel
- Class
- Race Condition
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in shmem swap entry handling allows xa_get_order to retrieve an outdated order value before xa_cmpxchg_irq, enabling truncation to erase data beyond the intended range or cause swapoff hangs and kernel panics.
Why it matters to the business
Linux systems using shared memory and swap may experience unexpected crashes, hangs during swap operations, or data corruption under concurrent truncate and swap activity, leading to downtime and potential loss of work in memory-intensive workloads.
How an attack unfolds
A local attacker with the ability to trigger shmem truncate and concurrent swap entry split operations can win the unprotected order read versus cmpxchg window, causing the kernel to process an incorrect or oversized swap entry and trigger a panic or hang; the issue was observed during ZSWAP stress testing.
How to fix it
Update the Linux kernel to the commit a99f9a4669a04662c8f9efe0e62cafc598153139 or later stable release that contains the fix; rebuild and reboot all affected systems.
How to confirm the fix worked
Confirm the running kernel contains commit a99f9a4669a04662c8f9efe0e62cafc598153139 via git log or kernel version string; re-run the original ZSWAP stress test workload that previously triggered hangs and panics to verify absence of symptoms.
Typical attack path
- Obtain local access on a Linux system using shmem-backed swap.
- Create conditions that cause concurrent truncate and swap entry split operations.
- Trigger xa_get_order without lock protection followed by xa_cmpxchg_irq.
- Force the order value to become stale or exceed the truncation border.
- Induce kernel panic or swapoff hang.
How to detect it
Search kernel logs and dmesg for swapoff hangs, page fault panics, or warnings related to shmem truncate and swap entry split; look for processes that were performing concurrent truncate and swap activity at the time of the failure.
What your security team should do
- Prioritize kernel updates on systems with heavy shmem and swap usage within the next maintenance window.
- Monitor for swapoff or truncate-related kernel panics in system logs.
- Apply the fix to all distributions derived from the affected stable trees once packages are available.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Linux | Kernel | 6.12.0 | 6.12.69 |
| openSUSE:Leap 16.0 | dtb-aarch64 | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-64kb | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-azure | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-default | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-default-base | 0 | 6.12.0-160000.27.1.160000.2.8 |
| openSUSE:Leap 16.0 | kernel-docs | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-rt | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-source | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-syms | 0 | 6.12.0-160000.27.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | 0 | 6.12.0-160000.27.1 |
Related vulnerabilities
- CVE-2026-23226 In the Linux kernel, the following vulnerability has been resolved: ksmbd: add chann_lock… Also affects Kernel
- CVE-2026-23225 In the Linux kernel, the following vulnerability has been resolved: sched/mmcid: Don't… Also affects Kernel
- CVE-2026-23230 In the Linux kernel, the following vulnerability has been resolved: smb: client: split… Also affects Kernel
- CVE-2026-23224 In the Linux kernel, the following vulnerability has been resolved: erofs: fix UAF issue… Also affects Kernel
- CVE-2026-23227 In the Linux kernel, the following vulnerability has been resolved: drm/exynos: vidi: use… Also affects Kernel
- CVE-2026-23223 In the Linux kernel, the following vulnerability has been resolved: xfs: fix UAF in… Also affects Kernel
- CVE-2026-23228 In the Linux kernel, the following vulnerability has been resolved: smb: server: fix leak… Also affects Kernel
- CVE-2026-23229 In the Linux kernel, the following vulnerability has been resolved: crypto: virtio - Add… Also affects Kernel