Description
In the Linux kernel, the following vulnerability has been resolved:
rbd: fix null-ptr-deref when device_add_disk() fails
do_rbd_add() publishes the device with device_add() before calling
device_add_disk(). If device_add_disk() fails after device_add()
succeeds, the error path calls rbd_free_disk() directly and then later
falls through to rbd_dev_device_release(), which calls rbd_free_disk()
again. This double teardown can leave blk-mq cleanup operating on
invalid state and trigger a null-ptr-deref in
__blk_mq_free_map_and_rqs(), reached from blk_mq_free_tag_set().
Fix this by following the normal remove ordering: call device_del()
before rbd_dev_device_release() when device_add_disk() fails after
device_add(). That keeps the teardown sequence consistent and avoids
re-entering disk cleanup through the wrong path.
The bug was first flagged by an experimental analysis tool we are
developing for kernel memory-management bugs while analyzing
v6.13-rc1. The tool is still under development and is not yet publicly
available.
We reproduced the bug on v7.0 with a real Ceph backend and a QEMU x86_64
guest booted with KASAN and CONFIG_FAILSLAB enabled. The reproducer
confines failslab injections to the __add_disk() range and injects
fail-nth while mapping an RBD image through
/sys/bus/rbd/add_single_major.
On the unpatched kernel, fail-nth=4 reliably triggered the fault:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 UID: 0 PID: 273 Comm: bash Not tainted 7.0.0-01247-gd60bc1401583 #6 PREEMPT(lazy)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014
RIP: 0010:__blk_mq_free_map_and_rqs+0x8c/0x240
Code: 00 00 48 8b 6b 60 41 89 f4 49 c1 e4 03 4c 01 e5 45 85 ed 0f 85 0a 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 e9 48 c1 e9 03 <80> 3c 01 00 0f 85 31 01 00 00 4c 8b 6d 00 4d 85 ed 0f 84 e2 00 00
RSP: 0018:ff1100000ab0fac8 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ff1100000c4806a0 RCX: 0000000000000000
RDX: 0000000000000002 RSI: 0000000000000000 RDI: ff1100000c4806f4
RBP: 0000000000000000 R08: 0000000000000001 R09: ffe21c000189001b
R10: ff1100000c4800df R11: ff1100006cf37be0 R12: 0000000000000000
R13: 0000000000000000 R14: ff1100000c480700 R15: ff1100000c480004
FS: 00007f0fbe8fe740(0000) GS:ff110000e5851000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe53473b2e0 CR3: 0000000012eef000 CR4: 00000000007516f0
PKRU: 55555554
Call Trace:
<TASK>
blk_mq_free_tag_set+0x77/0x460
do_rbd_add+0x1446/0x2b80
? __pfx_do_rbd_add+0x10/0x10
? lock_acquire+0x18c/0x300
? find_held_lock+0x2b/0x80
? sysfs_file_kobj+0xb6/0x1b0
? __pfx_sysfs_kf_write+0x10/0x10
kernfs_fop_write_iter+0x2f4/0x4a0
vfs_write+0x98e/0x1000
? expand_files+0x51f/0x850
? __pfx_vfs_write+0x10/0x10
ksys_write+0xf2/0x1d0
? __pfx_ksys_write+0x10/0x10
do_syscall_64+0x115/0x690
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0fbea15907
Code: 10 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
RSP: 002b:00007ffe22346ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000058 RCX: 00007f0fbea15907
RDX: 0000000000000058 RSI: 0000563ace6c0ef0 RDI: 0000000000000001
RBP: 0000563ace6c0ef0 R08: 0000563ace6c0ef0 R09: 6b6435726d694141
R10: 5250337279762f78 R11: 0000000000000246 R12: 0000000000000058
R13: 00007f0fbeb1c780 R14: ff1100000c480700 R15: ff1100000c480004
</TASK>
With this fix applied, rerunning the reproducer over fail-nth=1..256
yields no KASAN reports.
[ idryomov: rename err_out_device_del -> err_out_device ]
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.16 | 6.1.175 |
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 | 7.0.4-1 | — |
| Debian 13 | linux | 6.12.86-1 | — |
| Debian 12 | linux | 6.1.176-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 24.04 LTS | linux-bluefield | 6.8.0-1028.33 | — |
| Ubuntu 26.04 LTS | linux | 7.0.0-27.27 | USN-8488-1 |
| Ubuntu 26.04 LTS | linux-aws +1 | 7.0.0-1008.8 | USN-8489-1, USN-8488-1 |
| Ubuntu 26.04 LTS | linux-azure | 7.0.0-1010.10 | USN-8603-1 |
| Ubuntu 26.04 LTS | linux-gcp +1 | 7.0.0-1007.7 | USN-8488-1 |
| Ubuntu 26.04 LTS | linux-ibm +1 | 7.0.0-1009.9 | USN-8603-1, USN-8488-1 |
| Ubuntu 26.04 LTS | linux-nvidia | 7.0.0-1013.13 | USN-8507-1 |
| Ubuntu 26.04 LTS | linux-raspi | 7.0.0-1014.14 | USN-8488-2 |
| Ubuntu 26.04 LTS | linux-riscv +1 | 7.0.0-27.27.1 | USN-8488-1 |
| Ubuntu 25.10 | linux +8 | No fix yet | — |
| Ubuntu 24.04 LTS | linux | 6.8.0-136.136 | USN-8567-1 |
| Ubuntu 24.04 LTS | linux-aws | 6.8.0-1061.64 | USN-8595-2 |
| Ubuntu 24.04 LTS | linux-azure | 6.8.0-1063.71 | USN-8606-1 |
| Ubuntu 24.04 LTS | linux-azure-fde | 6.8.0-1062.69 | USN-8607-1 |
| Ubuntu 24.04 LTS | linux-gcp | 6.8.0-1064.72 | USN-8567-1 |
| Ubuntu 24.04 LTS | linux-gke | 6.8.0-1059.67 | USN-8567-1 |
| Ubuntu 24.04 LTS | linux-gkeop | 6.8.0-1046.50 | USN-8567-1 |
| Ubuntu 24.04 LTS | linux-hwe-7.0 | 7.0.0-28.28~24.04.1 | USN-8569-1 |
| Ubuntu 24.04 LTS | linux-ibm | 6.8.0-1061.62 | USN-8574-3 |
| Ubuntu 24.04 LTS | linux-lowlatency | 6.8.0-136.136.2 | USN-8574-2 |
| Ubuntu 24.04 LTS | linux-nvidia | 6.8.0-1059.62 | USN-8596-1 |
| Ubuntu 24.04 LTS | linux-nvidia-lowlatency | 6.8.0-1059.62.1 | USN-8596-1 |
| Ubuntu 24.04 LTS | linux-nvidia-tegra | 6.8.0-1030.31 | USN-8574-3 |
| Ubuntu 24.04 LTS | linux-oracle | 6.8.0-1058.61 | USN-8574-2 |
| Ubuntu 24.04 LTS | linux-raspi | 6.8.0-1061.65 | USN-8665-1 |
| Ubuntu 24.04 LTS | linux-riscv +27 | No fix yet | — |
| Ubuntu 24.04 LTS | linux-vmware | 6.8.0-1008.8 | — |
| Ubuntu 24.04 LTS | linux-xilinx | 6.8.0-1033.34 | USN-8574-3 |
| Ubuntu 22.04 LTS | linux-aws-6.8 | 6.8.0-1061.64~22.04.1 | USN-8595-3 |
| Ubuntu 22.04 LTS | linux-azure-6.8 | 6.8.0-1063.71~22.04.1 | USN-8606-1 |
| Ubuntu 22.04 LTS | linux-azure-fde-6.8 | 6.8.0-1062.69~22.04.1 | USN-8609-1 |
| Ubuntu 22.04 LTS | linux-gcp-6.8 | 6.8.0-1064.72~22.04.1 | USN-8567-1 |
| Ubuntu 22.04 LTS | linux-hwe-6.8 | 6.8.0-136.136~22.04.1 | USN-8619-1 |
| Ubuntu 22.04 LTS | linux-ibm-6.8 | 6.8.0-1061.62~22.04.1 | USN-8574-3 |
| Ubuntu 22.04 LTS | linux-lowlatency-hwe-6.8 | 6.8.0-136.136.2~22.04.1 | USN-8574-2 |
| Ubuntu 22.04 LTS | linux-nvidia-6.8 | 6.8.0-1059.62~22.04.1 | USN-8596-1 |
| Ubuntu 22.04 LTS | linux-oracle-6.8 | 6.8.0-1058.61~22.04.1 | USN-8595-1 |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv-6.8 | 6.8.0-136.136~22.04.3 | — |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2050.52 | USN-8665-1 |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime | 6.8.1-1056.57 | USN-8567-1 |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.14 +1 | No fix yet | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime-6.8 | 6.8.1-1056.57~22.04.2 | USN-8567-1 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-aws-fips | 6.8.0-1061.64+fips1 | USN-8595-3 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-azure-fips | 6.8.0-1063.71+fips2 | USN-8608-1 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-fips | 6.8.0-136.136+fips2 | USN-8574-2 |
| Ubuntu Pro FIPS-updates 24.04 LTS | linux-gcp-fips | 6.8.0-1064.72+fips1 | USN-8574-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | kernel-64kb +6 | 6.4.0-150700.53.60.1 | SUSE-SU-2026:2482-1 |
| SLES 15 SP7 | kernel-default-base | 6.4.0-150700.53.60.1.150700.17.35.4 | SUSE-SU-2026:2482-1 |
| SLES 15 SP7 | kernel-obs-build | 6.4.0-150700.53.60.2 | SUSE-SU-2026:2482-1 |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 16.0 | kernel-64kb +8 | 6.12.0-160000.36.1 | SUSE-SU-2026:22835-1 |
| SLES for SAP 16.0 | kernel-default-base | 6.12.0-160000.36.1.160000.2.17 | SUSE-SU-2026:22835-1 |
| SLES 16.0 | kernel-64kb +8 | 6.12.0-160000.36.1 | SUSE-SU-2026:22835-1, SUSE-SU-2026:22812-1 |
| SLES 16.0 | kernel-default-base | 6.12.0-160000.36.1.160000.2.17 | SUSE-SU-2026:22835-1 |
| SLE Micro 6.2 | kernel-default-base | 6.12.0-160000.36.1.160000.2.17 | SUSE-SU-2026:22769-1 |
| SLE Micro 6.2 | kernel-rt +5 | 6.12.0-160000.36.1 | SUSE-SU-2026:22769-1, SUSE-SU-2026:22742-1 |
| SLE Micro 6.1 | kernel-default-base | 6.4.0-47.1.21.24 | SUSE-SU-2026:22137-1 |
| SLE Micro 6.1 | kernel-rt +1 | 6.4.0-48.1 | SUSE-SU-2026:22458-1 |
| SLE Micro 6.1 | kernel-source +2 | 6.4.0-47.1 | SUSE-SU-2026:22137-1 |
| SLE Micro 6.0 | kernel-default-base | 6.4.0-47.1.21.24 | SUSE-SU-2026:22108-1 |
| SLE Micro 6.0 | kernel-rt +1 | 6.4.0-48.1 | SUSE-SU-2026:22433-1 |
| SLE Micro 6.0 | kernel-source +2 | 6.4.0-47.1 | SUSE-SU-2026:22108-1 |
| SLE Live Patching 15 SP7 | kernel-default | 6.4.0-150700.53.60.1 | SUSE-SU-2026:2482-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7-RT_Update_16 | 1-150700.1.5.2 | SUSE-SU-2026:2591-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_16 | 1-150700.15.3.2 | SUSE-SU-2026:2482-1 |
| SUSE Real Time Module 15 SP7 | kernel-rt +1 | 6.4.0-150700.7.59.2 | SUSE-SU-2026:2591-1 |
| SUSE Real Time Module 15 SP7 | kernel-syms-rt | 6.4.0-150700.7.59.1 | SUSE-SU-2026:2591-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | kernel-source | 7.0.11-1.1 | openSUSE-SU-2026:10954-1 |
| openSUSE Leap 16.0 | kernel-default-base | 6.12.0-160000.36.1.160000.2.17 | openSUSE-SU-2026:21388-1 |
| openSUSE Leap 16.0 | kernel-rt +11 | 6.12.0-160000.36.1 | openSUSE-SU-2026:21388-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.18.30-61.116 +2 | 1:1.0-0.amzn2023 | ALAS2023-2026-1882, ALAS2023-2026-1754, ALAS2023-2026-1753 |
| Amazon Linux 2023 | perf +11 | 1:6.1.175-219.357.amzn2023 | ALAS2023-2026-1882 |
| Amazon Linux 2023 | perf6.12 +11 | 1:6.12.88-119.157.amzn2023 | ALAS2023-2026-1753 |
| Amazon Linux 2023 | perf6.18 +11 | 1:6.18.30-61.116.amzn2023 | ALAS2023-2026-1754 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | kernel | 6.6.141.1-1 | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | kernel-uek +34 | 6.12.0-204.92.4.2.el10uek | ELSA-2026-50372 |
Advisories 37
- WID-SEC-2026-1700 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- USN-8574-3 linux-ibm, linux-ibm-6.8, linux-nvidia-tegra, linux-xilinx vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8595-3 linux-aws-6.8, linux-aws-fips vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8574-2 linux-fips, linux-lowlatency, linux-lowlatency-hwe-6.8, linux-oracle vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8596-1 linux-nvidia, linux-nvidia-6.8, linux-nvidia-lowlatency vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8665-1 linux-raspi, linux-raspi-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8603-1 linux-azure, linux-azure-fde vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8608-1 linux-azure-fips vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8574-1 linux-gcp-fips vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8595-2 linux-aws vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8595-1 linux-oracle-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 9, 2026
- USN-8567-1 linux, linux-gcp, linux-gcp-6.8, linux-gke, linux-gkeop, linux-realtime, linux-realtime-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8606-1 linux-azure, linux-azure-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8607-1 linux-azure-fde vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8619-1 linux-hwe-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8488-1 linux, linux-aws, linux-gcp, linux-ibm, linux-oracle, linux-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8609-1 linux-azure-fde-6.8 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8569-1 linux-hwe-7.0 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8488-2 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8489-1 linux-oem-7.0 vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- USN-8507-1 linux-nvidia vulnerabilities Ubuntu Security Notices (USN) · Nov 7, 2026
- ALAS2023-2026-1882 Important: kernel security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 1, 2026
- ALAS2023-2026-1753 Important: kernel6.12 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jul 29, 2026
- ALAS2023-2026-1754 Important: kernel6.18 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Jul 29, 2026
- SUSE-SU-2026:22835-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 28, 2026
- SUSE-SU-2026:22812-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 28, 2026
- openSUSE-SU-2026:21388-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 24, 2026
- SUSE-SU-2026:22769-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 23, 2026
- SUSE-SU-2026:22742-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 23, 2026
- SUSE-SU-2026:22458-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 4, 2026
- SUSE-SU-2026:22433-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 3, 2026
- ELSA-2026-50372 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Jul 2, 2026
- SUSE-SU-2026:2591-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 24, 2026
- SUSE-SU-2026:2482-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 24, 2026
- SUSE-SU-2026:22137-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 18, 2026
- SUSE-SU-2026:22108-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jun 17, 2026
- openSUSE-SU-2026:10954-1 kernel-devel-7.0.11-1.1 on GA media SUSE / openSUSE Security Updates · Jun 5, 2026
References
- https://git.kernel.org/stable/c/78bd0c143dea4b7a4c23c13356987ca0eafb442e
- https://git.kernel.org/stable/c/2f4809a879f0750c7790bbeeae86c9505797a06f
- https://git.kernel.org/stable/c/564cd8f4aeb9a938e470c5c91922fd02e4d41acc
- https://git.kernel.org/stable/c/ad0126ffcba8777109852979eaaa6dca6703abdb
- https://git.kernel.org/stable/c/059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e
- https://git.kernel.org/stable/c/d1fef92e414433ca7b89abf85cb0df42b8d475eb