Description
In the Linux kernel, the following vulnerability has been resolved:
kthread: consolidate kthread exit paths to prevent use-after-free
Guillaume reported crashes via corrupted RCU callback function pointers
during KUnit testing. The crash was traced back to the pidfs rhashtable
conversion which replaced the 24-byte rb_node with an 8-byte rhash_head
in struct pid, shrinking it from 160 to 144 bytes.
struct kthread (without CONFIG_BLK_CGROUP) is also 144 bytes. With
CONFIG_SLAB_MERGE_DEFAULT and SLAB_HWCACHE_ALIGN both round up to
192 bytes and share the same slab cache. struct pid.rcu.func and
struct kthread.affinity_node both sit at offset 0x78.
When a kthread exits via make_task_dead() it bypasses kthread_exit() and
misses the affinity_node cleanup. free_kthread_struct() frees the memory
while the node is still linked into the global kthread_affinity_list. A
subsequent list_del() by another kthread writes through dangling list
pointers into the freed and reused memory, corrupting the pid's
rcu.func pointer.
Instead of patching free_kthread_struct() to handle the missed cleanup,
consolidate all kthread exit paths. Turn kthread_exit() into a macro
that calls do_exit() and add kthread_do_exit() which is called from
do_exit() for any task with PF_KTHREAD set. This guarantees that
kthread-specific cleanup always happens regardless of the exit path -
make_task_dead(), direct do_exit(), or kthread_exit().
Replace __to_kthread() with a new tsk_is_kthread() accessor in the
public header. Export do_exit() since module code using the
kthread_exit() macro now needs it directly.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.14 | 6.18.19 |
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.19.10-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 25.10 | linux | 6.17.0-40.40 | USN-8490-1 |
| Ubuntu 25.10 | linux-aws | 6.17.0-1019.19 | USN-8490-1 |
| Ubuntu 25.10 | linux-azure +1 | No fix yet | — |
| Ubuntu 25.10 | linux-gcp | 6.17.0-1020.22 | USN-8490-1 |
| Ubuntu 25.10 | linux-oracle | 6.17.0-1018.18 | USN-8490-1 |
| Ubuntu 25.10 | linux-raspi | 6.17.0-1021.21 | USN-8546-1 |
| Ubuntu 25.10 | linux-realtime | 6.17.0-1017.19 | USN-8490-2 |
| Ubuntu 25.10 | linux-riscv | 6.17.0-40.40.1 | — |
| Ubuntu 24.04 LTS | linux-aws-6.17 | 6.17.0-1019.19~24.04.1 | USN-8490-1 |
| Ubuntu 24.04 LTS | linux-azure-6.17 | 6.17.0-1021.21~24.04.1 | USN-8604-1 |
| Ubuntu 24.04 LTS | linux-gcp-6.17 | 6.17.0-1020.22~24.04.1 | USN-8490-1 |
| Ubuntu 24.04 LTS | linux-hwe-6.17 | 6.17.0-40.40~24.04.1 | USN-8545-1 |
| Ubuntu 24.04 LTS | linux-nvidia-6.17 | 6.17.0-1026.26 | USN-8508-1 |
| Ubuntu 24.04 LTS | linux-oem-6.17 | 6.17.0-1028.28 | USN-8491-1 |
| Ubuntu 24.04 LTS | linux-oracle-6.17 +1 | 6.17.0-1018.18~24.04.1 | USN-8605-1, USN-8490-1 |
| Ubuntu 24.04 LTS | linux-riscv +19 | 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-1017.19~24.04.1 | USN-8490-2 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.18.20-20.229 | 1:1.0-0.amzn2023 | ALAS2023-2026-1596 |
| Amazon Linux 2023 | perf6.18 +14 | 1:6.18.20-20.229.amzn2023 | ALAS2023-2026-1596 |
Advisories 10
- WID-SEC-2026-1454 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-8490-2 linux-realtime, linux-realtime-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8508-1 linux-nvidia-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8546-1 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8491-1 linux-oem-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8545-1 linux-hwe-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8490-1 linux, linux-aws, linux-aws-6.17, linux-gcp, linux-gcp-6.17, linux-oracle, linux-oracle-6.17 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8605-1 linux-azure-fde-6.17 vulnerabilities Ubuntu Security Notices (USN) · Oct 17, 2026
- ALAS2023-2026-1596 Important: kernel6.18 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jun 16, 2026