Description
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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.12 | 6.12.69 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.18.9-1 | — |
| Debian 13 | linux | 6.12.69-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 25.10 | linux +8 | No fix yet | — |
| Ubuntu 24.04 LTS | linux-azure-6.17 | 6.17.0-1021.21~24.04.1 | USN-8604-1 |
| Ubuntu 24.04 LTS | linux-azure-fde-6.17 | 6.17.0-1018.18~24.04.1 | USN-8605-1 |
| Ubuntu 24.04 LTS | linux-gcp-6.17 | 6.17.0-1021.24~24.04.1 | USN-8570-1 |
| Ubuntu 24.04 LTS | linux-hwe-6.17 | 6.17.0-41.41~24.04.1 | — |
| Ubuntu 24.04 LTS | linux-nvidia-6.17 | 6.17.0-1031.31 | USN-8669-1 |
| Ubuntu 24.04 LTS | linux-oem-6.17 | 6.17.0-1030.30 | USN-8594-1 |
| Ubuntu 24.04 LTS | linux-oracle-6.17 | 6.17.0-1019.19~24.04.3 | USN-8570-2 |
| Ubuntu 24.04 LTS | linux-riscv +20 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.14 | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.17 | 6.17.0-1018.20~24.04.1 | USN-8570-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 16.0 | kernel-64kb +8 | 6.12.0-160000.27.1 | SUSE-SU-2026:20931-1 |
| SLES for SAP 16.0 | kernel-default-base | 6.12.0-160000.27.1.160000.2.8 | SUSE-SU-2026:20931-1 |
| SLES for SAP 16.0 | kernel-livepatch-SLE16_Update_0 | 17-160000.4.3 | SUSE-SU-2026:23341-1 |
| SLES for SAP 16.0 | kernel-livepatch-SLE16_Update_1 | 15-160000.1.1 | SUSE-SU-2026:23343-1 |
| SLES for SAP 16.0 | kernel-livepatch-SLE16_Update_2 | 13-160000.1.1 | SUSE-SU-2026:23340-1 |
| SLES for SAP 16.0 | kernel-livepatch-SLE16_Update_3 | 12-160000.1.1 | SUSE-SU-2026:23339-1 |
| SLES for SAP 16.0 | kernel-livepatch-SLE16_Update_4 | 11-160000.1.1 | SUSE-SU-2026:23338-1 |
| SLES for SAP 16.0 | kernel-livepatch-SLE16_Update_5 | 10-160000.1.1 | SUSE-SU-2026:23337-1 |
| SLES 16.0 | kernel-64kb +8 | 6.12.0-160000.27.1 | SUSE-SU-2026:20931-1 |
| SLES 16.0 | kernel-default-base | 6.12.0-160000.27.1.160000.2.8 | SUSE-SU-2026:20931-1 |
| SLES 16.0 | kernel-livepatch-SLE16_Update_0 | 17-160000.4.3 | SUSE-SU-2026:23341-1 |
| SLES 16.0 | kernel-livepatch-SLE16_Update_1 | 15-160000.1.1 | SUSE-SU-2026:23343-1 |
| SLES 16.0 | kernel-livepatch-SLE16_Update_2 | 13-160000.1.1 | SUSE-SU-2026:23340-1 |
| SLES 16.0 | kernel-livepatch-SLE16_Update_3 | 12-160000.1.1 | SUSE-SU-2026:23339-1 |
| SLES 16.0 | kernel-livepatch-SLE16_Update_4 | 11-160000.1.1 | SUSE-SU-2026:23338-1 |
| SLES 16.0 | kernel-livepatch-SLE16_Update_5 | 10-160000.1.1 | SUSE-SU-2026:23337-1 |
| SLE Micro 6.2 | kernel-default-base | 6.12.0-160000.27.1.160000.2.8 | SUSE-SU-2026:20838-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16-RT_Update_0 | 15-160000.3.4 | SUSE-SU-2026:23272-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16-RT_Update_1 | 14-160000.1.1 | SUSE-SU-2026:23271-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16_Update_0 | 17-160000.4.3 | SUSE-SU-2026:23293-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16_Update_1 | 15-160000.1.1 | SUSE-SU-2026:23296-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16_Update_2 | 13-160000.1.1 | SUSE-SU-2026:23292-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16_Update_3 +1 | 12-160000.1.1 | SUSE-SU-2026:23291-1, SUSE-SU-2026:23270-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16_Update_4 +2 | 11-160000.1.1 | SUSE-SU-2026:23290-1, SUSE-SU-2026:23269-1, SUSE-SU-2026:23268-1 |
| SLE Micro 6.2 | kernel-livepatch-SLE16_Update_5 +1 | 10-160000.1.1 | SUSE-SU-2026:23288-1, SUSE-SU-2026:23267-1 |
| SLE Micro 6.2 | kernel-rt +5 | 6.12.0-160000.27.1 | SUSE-SU-2026:20873-1, SUSE-SU-2026:20838-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 16.0 | kernel-default-base | 6.12.0-160000.27.1.160000.2.8 | openSUSE-SU-2026:20416-1 |
| openSUSE Leap 16.0 | kernel-rt +11 | 6.12.0-160000.27.1 | openSUSE-SU-2026:20416-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.12.73-95.123 | 1:1.0-0.amzn2023 | ALAS2023-2026-1487 |
| Amazon Linux 2023 | perf6.12 +14 | 1:6.12.73-95.123.amzn2023 | ALAS2023-2026-1487 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | kernel-uek +34 | 6.12.0-200.74.27.el10uek | ELSA-2026-50372, ELSA-2026-50232, ELSA-2026-50160 |
Advisories 33
- WID-SEC-2026-0421 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- USN-8604-1 linux-azure-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8669-1 linux-nvidia-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 6, 2026
- USN-8570-1 linux-gcp-6.17, linux-realtime-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 6, 2026
- USN-8570-2 linux-oracle-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 6, 2026
- USN-8594-1 linux-oem-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 6, 2026
- USN-8605-1 linux-azure-fde-6.17 vulnerabilities Ubuntu Security Notices (USN) · Oct 17, 2026
- SUSE-SU-2026:23338-1 Security update for the Linux Kernel (Live Patch 4 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 10, 2026
- SUSE-SU-2026:23343-1 Security update for the Linux Kernel (Live Patch 1 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 10, 2026
- SUSE-SU-2026:23339-1 Security update for the Linux Kernel (Live Patch 3 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 10, 2026
- SUSE-SU-2026:23340-1 Security update for the Linux Kernel (Live Patch 2 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 10, 2026
- SUSE-SU-2026:23341-1 Security update for the Linux Kernel (Live Patch 0 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 10, 2026
- SUSE-SU-2026:23337-1 Security update for the Linux Kernel (Live Patch 5 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 10, 2026
- SUSE-SU-2026:23293-1 Security update for the Linux Kernel (Live Patch 0 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 4, 2026
- SUSE-SU-2026:23288-1 Security update for the Linux Kernel (Live Patch 5 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 4, 2026
- SUSE-SU-2026:23290-1 Security update for the Linux Kernel (Live Patch 4 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 4, 2026
- SUSE-SU-2026:23291-1 Security update for the Linux Kernel (Live Patch 3 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 4, 2026
- SUSE-SU-2026:23292-1 Security update for the Linux Kernel (Live Patch 2 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 4, 2026
- SUSE-SU-2026:23296-1 Security update for the Linux Kernel (Live Patch 1 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Sep 4, 2026
- SUSE-SU-2026:23272-1 Security update for the Linux Kernel RT (Live Patch 0 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Aug 31, 2026
- SUSE-SU-2026:23267-1 Security update for the Linux Kernel RT (Live Patch 5 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Aug 31, 2026
- SUSE-SU-2026:23268-1 Security update for the Linux Kernel RT (Live Patch 4 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Aug 31, 2026
- SUSE-SU-2026:23269-1 Security update for the Linux Kernel RT (Live Patch 3 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Aug 31, 2026
- SUSE-SU-2026:23270-1 Security update for the Linux Kernel RT (Live Patch 2 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Aug 31, 2026
- SUSE-SU-2026:23271-1 Security update for the Linux Kernel RT (Live Patch 1 for SUSE Linux Enterprise 16) SUSE / openSUSE Security Updates · Aug 31, 2026
- SUSE-SU-2026:20873-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 9, 2026
- ELSA-2026-50372 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Jul 2, 2026
- ALAS2023-2026-1487 Important: kernel6.12 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · May 9, 2026
- ELSA-2026-50232 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Apr 15, 2026
- SUSE-SU-2026:20931-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Apr 2, 2026
- openSUSE-SU-2026:20416-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 29, 2026
- SUSE-SU-2026:20838-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 28, 2026
- ELSA-2026-50160 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Mar 20, 2026