Description
In the Linux kernel, the following vulnerability has been resolved:

nvme: Do not drop the cdev reference twice when cdev_device_add() fails

Since commit 9952f3882ecb ("nvme: fix cdev lifetime"),
nvme_add_ns_cdev() and nvme_add_ns_head_cdev() take a reference to the
namespace (or namespace head) before calling nvme_cdev_add(), to be
dropped by the char device's release, nvme_cdev_rel(), and drop it
themselves when nvme_cdev_add() fails. But when cdev_device_add()
fails, nvme_cdev_add() has already put the device, and nvme_cdev_rel()
has already dropped that reference: the caller drops it a second time.

With one allocation failure injected into cdev_device_add() for a
namespace on an NVMe over loop controller, deleting the controller
gives, with native multipath:

BUG: KASAN: slab-use-after-free in nvme_put_ns_head+0x21/0x140
Write of size 4 at addr ff1100000a4ea078 by task init/1
nvme_put_ns_head
nvme_put_ns
nvme_remove_namespaces
nvme_do_delete_ctrl
nvme_delete_ctrl_sync
nvme_sysfs_delete
Freed by task 1:
kfree
nvme_ns_remove
nvme_remove_namespaces
refcount_t: underflow; use-after-free.

Take the reference in nvme_cdev_add() instead, right before
cdev_device_add(), and let the callers neither take nor drop it. Add
nvme_is_ns_cdev() for the check that nvme_cdev_rel() and nvme_cdev_add()
now share.
Published: 2026-11-20
Score: 4.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 20 Nov 2026 12:30:00 +0000

Type Values Removed Values Added
First Time appeared Linux linux
Weaknesses CWE-825
Vendors & Products Linux linux
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.1, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Fri, 20 Nov 2026 06:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: nvme: Do not drop the cdev reference twice when cdev_device_add() fails Since commit 9952f3882ecb ("nvme: fix cdev lifetime"), nvme_add_ns_cdev() and nvme_add_ns_head_cdev() take a reference to the namespace (or namespace head) before calling nvme_cdev_add(), to be dropped by the char device's release, nvme_cdev_rel(), and drop it themselves when nvme_cdev_add() fails. But when cdev_device_add() fails, nvme_cdev_add() has already put the device, and nvme_cdev_rel() has already dropped that reference: the caller drops it a second time. With one allocation failure injected into cdev_device_add() for a namespace on an NVMe over loop controller, deleting the controller gives, with native multipath: BUG: KASAN: slab-use-after-free in nvme_put_ns_head+0x21/0x140 Write of size 4 at addr ff1100000a4ea078 by task init/1 nvme_put_ns_head nvme_put_ns nvme_remove_namespaces nvme_do_delete_ctrl nvme_delete_ctrl_sync nvme_sysfs_delete Freed by task 1: kfree nvme_ns_remove nvme_remove_namespaces refcount_t: underflow; use-after-free. Take the reference in nvme_cdev_add() instead, right before cdev_device_add(), and let the callers neither take nor drop it. Add nvme_is_ns_cdev() for the check that nvme_cdev_rel() and nvme_cdev_add() now share.
Title nvme: Do not drop the cdev reference twice when cdev_device_add() fails
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-11-20T05:50:53.082Z

Reserved: 2026-09-25T10:25:14.430Z

Link: CVE-2026-99714

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-20T06:18:07.677

Modified: 2026-11-20T06:18:07.677

Link: CVE-2026-99714

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-11-20T05:50:53Z

Links: CVE-2026-99714 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-11-20T12:15:02Z

Weaknesses