Description
In the Linux kernel, the following vulnerability has been resolved:
mm/slub: add missing TID updates on slab deactivation
The fastpath in slab_alloc_node() assumes that c->slab is stable as long as
the TID stays the same. However, two places in __slab_alloc() currently
don't update the TID when deactivating the CPU slab.
If multiple operations race the right way, this could lead to an object
getting lost; or, in an even more unlikely situation, it could even lead to
an object being freed onto the wrong slab's freelist, messing up the
`inuse` counter and eventually causing a page to be freed to the page
allocator while it still contains slab objects.
(I haven't actually tested these cases though, this is just based on
looking at the code. Writing testcases for this stuff seems like it'd be
a pain...)
The race leading to state inconsistency is (all operations on the same CPU
and kmem_cache):
- task A: begin do_slab_free():
- read TID
- read pcpu freelist (==NULL)
- check `slab == c->slab` (true)
- [PREEMPT A->B]
- task B: begin slab_alloc_node():
- fastpath fails (`c->freelist` is NULL)
- enter __slab_alloc()
- slub_get_cpu_ptr() (disables preemption)
- enter ___slab_alloc()
- take local_lock_irqsave()
- read c->freelist as NULL
- get_freelist() returns NULL
- write `c->slab = NULL`
- drop local_unlock_irqrestore()
- goto new_slab
- slub_percpu_partial() is NULL
- get_partial() returns NULL
- slub_put_cpu_ptr() (enables preemption)
- [PREEMPT B->A]
- task A: finish do_slab_free():
- this_cpu_cmpxchg_double() succeeds()
- [CORRUPT STATE: c->slab==NULL, c->freelist!=NULL]
From there, the object on c->freelist will get lost if task B is allowed to
continue from here: It will proceed to the retry_load_slab label,
set c->slab, then jump to load_freelist, which clobbers c->freelist.
But if we instead continue as follows, we get worse corruption:
- task A: run __slab_free() on object from other struct slab:
- CPU_PARTIAL_FREE case (slab was on no list, is now on pcpu partial)
- task A: run slab_alloc_node() with NUMA node constraint:
- fastpath fails (c->slab is NULL)
- call __slab_alloc()
- slub_get_cpu_ptr() (disables preemption)
- enter ___slab_alloc()
- c->slab is NULL: goto new_slab
- slub_percpu_partial() is non-NULL
- set c->slab to slub_percpu_partial(c)
- [CORRUPT STATE: c->slab points to slab-1, c->freelist has objects
from slab-2]
- goto redo
- node_match() fails
- goto deactivate_slab
- existing c->freelist is passed into deactivate_slab()
- inuse count of slab-1 is decremented to account for object from
slab-2
At this point, the inuse count of slab-1 is 1 lower than it should be.
This means that if we free all allocated objects in slab-1 except for one,
SLUB will think that slab-1 is completely unused, and may free its page,
leading to use-after-free.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 3.1 | 4.9.323 |
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 | 5.18.14-1 | — |
| Debian 13 | linux | 5.18.14-1 | — |
| Debian 12 | linux | 5.18.14-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux-raspi-realtime | No fix yet | — |
| Ubuntu 22.04 LTS | linux +1 | 5.15.0-50.56 | — |
| Ubuntu 22.04 LTS | linux-aws | 5.15.0-1021.25 | — |
| Ubuntu 22.04 LTS | linux-azure | 5.15.0-1021.26 | — |
| Ubuntu 22.04 LTS | linux-azure-fde | 5.15.0-1024.30.1 | — |
| Ubuntu 22.04 LTS | linux-gcp | 5.15.0-1019.25 | — |
| Ubuntu 22.04 LTS | linux-gke | 5.15.0-1017.20 | — |
| Ubuntu 22.04 LTS | linux-gkeop | 5.15.0-1004.6 | — |
| Ubuntu 22.04 LTS | linux-ibm | 5.15.0-1015.17 | — |
| Ubuntu 22.04 LTS | linux-intel-iotg | 5.15.0-1017.22 | — |
| Ubuntu 22.04 LTS | linux-kvm | 5.15.0-1019.23 | — |
| Ubuntu 22.04 LTS | linux-nvidia | 5.15.0-1015.15 | — |
| Ubuntu 22.04 LTS | linux-oracle | 5.15.0-1019.24 | — |
| Ubuntu 22.04 LTS | linux-raspi | 5.15.0-1016.18 | — |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 20.04 LTS | linux | 5.4.0-128.144 | — |
| Ubuntu 20.04 LTS | linux-aws | 5.4.0-1086.93 | — |
| Ubuntu 20.04 LTS | linux-aws-5.15 | 5.15.0-1021.25~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-azure | 5.4.0-1094.100 | — |
| Ubuntu 20.04 LTS | linux-azure-5.15 | 5.15.0-1021.26~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-bluefield | 5.4.0-1047.52 | — |
| Ubuntu 20.04 LTS | linux-gcp | 5.4.0-1090.98 | — |
| Ubuntu 20.04 LTS | linux-gcp-5.15 | 5.15.0-1021.28~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-hwe-5.15 +1 | 5.15.0-50.56~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-ibm | 5.4.0-1034.38 | — |
| Ubuntu 20.04 LTS | linux-intel-iotg-5.15 | 5.15.0-1017.22~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-iot | 5.4.0-1005.7 | — |
| Ubuntu 20.04 LTS | linux-kvm | 5.4.0-1076.81 | — |
| Ubuntu 20.04 LTS | linux-oracle | 5.4.0-1084.92 | — |
| Ubuntu 20.04 LTS | linux-oracle-5.15 | 5.15.0-1019.24~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-raspi | 5.4.0-1071.81 | — |
| Ubuntu 20.04 LTS | linux-riscv-5.15 | 5.15.0-1022.26~20.04.1 | — |
| Ubuntu 18.04 LTS | linux | 4.15.0-194.205 | — |
| Ubuntu 18.04 LTS | linux-aws | 4.15.0-1142.154 | — |
| Ubuntu 18.04 LTS | linux-aws-5.4 | 5.4.0-1086.93~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-azure-4.15 | 4.15.0-1153.168 | — |
| Ubuntu 18.04 LTS | linux-azure-5.4 | 5.4.0-1094.100~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp-4.15 | 4.15.0-1137.153 | — |
| Ubuntu 18.04 LTS | linux-gcp-5.4 | 5.4.0-1092.101~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-hwe-5.4 | 5.4.0-128.144~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-ibm-5.4 | 5.4.0-1034.38~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-kvm | 4.15.0-1128.133 | — |
| Ubuntu 18.04 LTS | linux-oracle | 4.15.0-1107.118 | — |
| Ubuntu 18.04 LTS | linux-oracle-5.4 | 5.4.0-1084.92~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-raspi-5.4 | 5.4.0-1071.81~18.04.1 | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime | 5.15.0-1022.22 | — |
| Ubuntu Pro FIPS 20.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 18.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-aws-fips | 5.4.0-1086.93+fips1 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-azure-fips | 5.4.0-1094.100+fips1 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-fips | 5.4.0-1062.70 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-gcp-fips | 5.4.0-1092.101+fips1 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-aws-fips | 4.15.0-2081.87 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-azure-fips | 4.15.0-2062.68 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-fips | 4.15.0-1099.110 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-gcp-fips | 4.15.0-2047.52 | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro 16.04 LTS | linux +2 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | linux-aws-hwe | 4.15.0-1142.154~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-azure | 4.15.0-1153.168~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-gcp | 4.15.0-1137.153~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-hwe | 4.15.0-194.205~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-oracle | 4.15.0-1107.118~16.04.1 | — |
| Ubuntu Pro 14.04 LTS | linux +2 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | linux-azure | 4.15.0-1153.168~14.04.1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 9 | bpftool | 7.0.0-284.11.1.el9_2 | RHSA-2023:2458 |
| RHEL 9 | perf +48 | 5.14.0-284.11.1.el9_2 | RHSA-2023:2458 |
| RHEL 8 | perf +26 | 4.18.0-553.el8_10 | RHSA-2024:3138 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | kernel | 4.18.0-553.123.1.el8_10.cloud.0.1 | RXSA-2024:3138 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | kernel-64kb +6 | 5.14.21-150500.55.100.1 | SUSE-SU-2025:1241-1 |
| SLES 15 SP5 | kernel-default-base | 5.14.21-150500.55.100.1.150500.6.47.1 | SUSE-SU-2025:1241-1 |
| SLES 15 SP4 | kernel-64kb +6 | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SLES 15 SP4 | kernel-default-base | 5.14.21-150400.24.158.1.150400.24.78.1 | SUSE-SU-2025:1027-1 |
| SLES 15 SP3 | kernel-64kb +7 | 5.3.18-150300.59.201.1 | SUSE-SU-2025:1263-1 |
| SLES 15 SP3 | kernel-default-base | 5.3.18-150300.59.201.1.150300.18.120.1 | SUSE-SU-2025:1263-1 |
Show 17 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP5 | kernel-default-base | 5.14.21-150500.55.100.1.150500.6.47.1 | SUSE-SU-2025:1241-1 |
| SLES for SAP 15 SP5 | kernel-docs +4 | 5.14.21-150500.55.100.1 | SUSE-SU-2025:1241-1 |
| SLES for SAP 15 SP4 | kernel-default-base | 5.14.21-150400.24.158.1.150400.24.78.1 | SUSE-SU-2025:1027-1 |
| SLES for SAP 15 SP4 | kernel-docs +4 | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SLES for SAP 15 SP3 | kernel-default-base | 5.3.18-150300.59.201.1.150300.18.120.1 | SUSE-SU-2025:1263-1 |
| SLES for SAP 15 SP3 | kernel-docs +5 | 5.3.18-150300.59.201.1 | SUSE-SU-2025:1263-1 |
| SLE Micro 5.5 | kernel-default-base | 5.14.21-150500.55.100.1.150500.6.47.1 | SUSE-SU-2025:1241-1 |
| SLE Micro 5.5 | kernel-rt +1 | 5.14.21-150500.13.91.1 | SUSE-SU-2025:1176-1 |
| SLE Micro 5.5 | kernel-source +1 | 5.14.21-150500.55.100.1 | SUSE-SU-2025:1241-1 |
| SLE Micro 5.4 | kernel-default | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SLE Micro 5.4 | kernel-default-base | 5.14.21-150400.24.158.1.150400.24.78.1 | SUSE-SU-2025:1027-1 |
| SLE Micro 5.4 | kernel-rt +1 | 5.14.21-150400.15.115.1 | SUSE-SU-2025:1183-1 |
| SLE Micro 5.3 | kernel-default | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SLE Micro 5.3 | kernel-default-base | 5.14.21-150400.24.158.1.150400.24.78.1 | SUSE-SU-2025:1027-1 |
| SLE Micro 5.3 | kernel-rt +1 | 5.14.21-150400.15.115.1 | SUSE-SU-2025:1183-1 |
| SLE Micro 5.2 | kernel-default | 5.3.18-150300.59.201.1 | SUSE-SU-2025:1263-1 |
| SLE Micro 5.2 | kernel-default-base | 5.3.18-150300.59.201.1.150300.18.120.1 | SUSE-SU-2025:1263-1 |
| SLE Micro 5.2 | kernel-rt +1 | 5.3.18-150300.205.1 | SUSE-SU-2025:1194-1 |
| SLE Micro 5.1 | kernel-default | 5.3.18-150300.59.201.1 | SUSE-SU-2025:1263-1 |
| SLE Micro 5.1 | kernel-default-base | 5.3.18-150300.59.201.1.150300.18.120.1 | SUSE-SU-2025:1263-1 |
| SLE Micro 5.1 | kernel-rt +1 | 5.3.18-150300.205.1 | SUSE-SU-2025:1194-1 |
| SLE Live Patching 15 SP5 | kernel-default | 5.14.21-150500.55.100.1 | SUSE-SU-2025:1241-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_25 | 1-150500.11.3.1 | SUSE-SU-2025:1241-1 |
| SLE Live Patching 15 SP4 | kernel-default | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SLE Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_38 | 1-150400.9.3.1 | SUSE-SU-2025:1027-1 |
| SLE Live Patching 15 SP3 | kernel-default | 5.3.18-150300.59.201.1 | SUSE-SU-2025:1263-1 |
| SLE Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_56 | 1-150300.7.3.1 | SUSE-SU-2025:1263-1 |
| SLE HPC 15 SP5 | kernel-64kb +5 | 5.14.21-150500.55.100.1 | SUSE-SU-2025:1241-1 |
| SLE HPC 15 SP5 | kernel-default-base | 5.14.21-150500.55.100.1.150500.6.47.1 | SUSE-SU-2025:1241-1 |
| SLE HPC 15 SP4 | kernel-64kb +5 | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SLE HPC 15 SP4 | kernel-default-base | 5.14.21-150400.24.158.1.150400.24.78.1 | SUSE-SU-2025:1027-1 |
| SLE HPC 15 SP3 | kernel-64kb +6 | 5.3.18-150300.59.201.1 | SUSE-SU-2025:1263-1 |
| SLE HPC 15 SP3 | kernel-default-base | 5.3.18-150300.59.201.1.150300.18.120.1 | SUSE-SU-2025:1263-1 |
| SUSE Manager Server 4.3 | kernel-default-base | 5.14.21-150400.24.158.1.150400.24.78.1 | SUSE-SU-2025:1027-1 |
| SUSE Manager Server 4.3 | kernel-syms +3 | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SUSE Manager Proxy 4.3 | kernel-default-base | 5.14.21-150400.24.158.1.150400.24.78.1 | SUSE-SU-2025:1027-1 |
| SUSE Manager Proxy 4.3 | kernel-syms +2 | 5.14.21-150400.24.158.1 | SUSE-SU-2025:1027-1 |
| SUSE Enterprise Storage 7.1 | kernel-64kb +6 | 5.3.18-150300.59.201.1 | SUSE-SU-2025:1263-1 |
| SUSE Enterprise Storage 7.1 | kernel-default-base | 5.3.18-150300.59.201.1.150300.18.120.1 | SUSE-SU-2025:1263-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | kernel-livepatch-4.14.290-217.505 | 1.0-0.amzn2 | ALAS2-2025-2790 |
| Amazon Linux 2 | perf +8 | 4.14.290-217.505.amzn2 | ALAS2-2025-2790 |
Advisories 10
- RHSA-2024:3138 Red Hat Security Advisory: kernel security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2023:2458 Red Hat Security Advisory: kernel security, bug fix, and enhancement update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RXSA-2024:3138 Moderate: kernel security, bug fix, and enhancement update Rocky Linux Security Advisories · May 29, 2026
- SUSE-SU-2025:1194-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:1176-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:1241-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:1027-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2025:1183-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2-2025-2790 Important: kernel security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · May 19, 2025
- SUSE-SU-2025:1263-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Apr 16, 2025
References
- https://git.kernel.org/stable/c/308c6d0e1f200fd26c71270c6e6bfcf0fc6ff082
- https://git.kernel.org/stable/c/d6a597450e686d4c6388bd3cdcb17224b4dae7f0
- https://git.kernel.org/stable/c/e2b2f0e2e34d71ae6c2a1114fd3c525930e84bc7
- https://git.kernel.org/stable/c/e7e3e90d671078455a3a08189f89d85b3da2de9e
- https://git.kernel.org/stable/c/6c32496964da0dc230cea763a0e934b2e02dabd5
- https://git.kernel.org/stable/c/0515cc9b6b24877f59b222ade704bfaa42caa2a6
- https://git.kernel.org/stable/c/197e257da473c725dfe47759c3ee02f2398d8ea5
- https://git.kernel.org/stable/c/eeaa345e128515135ccb864c04482180c08e3259