# CVE-2026-46079: rbd: fix null-ptr-deref when device\_add\_disk() fails

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 5, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2026-05-27T12:58:13.903Z
- **Modified:** 2026-11-06T17:17:35.057Z

## Who should check

- Anyone running Linux \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 78bd0c143dea4b7a4c23c13356987ca0eafb442e; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 2f4809a879f0750c7790bbeeae86c9505797a06f; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 564cd8f4aeb9a938e470c5c91922fd02e4d41acc; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< ad0126ffcba8777109852979eaaa6dca6703abdb; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< d1fef92e414433ca7b89abf85cb0df42b8d475eb
- Anyone running Linux 5.16

## 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 and fixed versions

- Linux: \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 78bd0c143dea4b7a4c23c13356987ca0eafb442e; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 2f4809a879f0750c7790bbeeae86c9505797a06f; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 564cd8f4aeb9a938e470c5c91922fd02e4d41acc; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< ad0126ffcba8777109852979eaaa6dca6703abdb; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< d1fef92e414433ca7b89abf85cb0df42b8d475eb (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-46079. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-46079.md
Affected: Linux >= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, < 78bd0c143dea4b7a4c23c13356987ca0eafb442e; >= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, < 2f4809a879f0750c7790bbeeae86c9505797a06f; >= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, < 564cd8f4aeb9a938e470c5c91922fd02e4d41acc; >= 27c97abc30e2b9ad2288977…
Fixed in: Linux 78bd0c143dea4b7a4c23c13356987ca0eafb442e, Linux 2f4809a879f0750c7790bbeeae86c9505797a06f, Linux 564cd8f4aeb9a938e470c5c91922fd02e4d41acc, Linux 059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-46079 being exploited?

There is no confirmed exploitation: CVE-2026-46079 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-46079?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-46079?

Linux \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 78bd0c143dea4b7a4c23c13356987ca0eafb442e; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 2f4809a879f0750c7790bbeeae86c9505797a06f; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 564cd8f4aeb9a938e470c5c91922fd02e4d41acc; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< ad0126ffcba8777109852979eaaa6dca6703abdb; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< 059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e; \>= 27c97abc30e2b9ad2288977c0ecbef4d50553f57, \< d1fef92e414433ca7b89abf85cb0df42b8d475eb; Linux 5.16.

### Is there a fix for CVE-2026-46079?

Yes. Fixed in Linux 78bd0c143dea4b7a4c23c13356987ca0eafb442e, Linux 2f4809a879f0750c7790bbeeae86c9505797a06f, Linux 564cd8f4aeb9a938e470c5c91922fd02e4d41acc, Linux 059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-46079?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/78bd0c143dea4b7a4c23c13356987ca0eafb442e>
- patch: <https://git.kernel.org/stable/c/2f4809a879f0750c7790bbeeae86c9505797a06f>
- patch: <https://git.kernel.org/stable/c/564cd8f4aeb9a938e470c5c91922fd02e4d41acc>
- patch: <https://git.kernel.org/stable/c/ad0126ffcba8777109852979eaaa6dca6703abdb>
- patch: <https://git.kernel.org/stable/c/059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e>
- patch: <https://git.kernel.org/stable/c/d1fef92e414433ca7b89abf85cb0df42b8d475eb>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-46079>

HTML: <https://flawdb.com/CVE-2026-46079> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-46079>
