CVE-2026-99714 in Linuxinfo

Summary

by MITRE • 11/20/2026

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.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel NVMe subsystem contains a reference counting error in its character device management logic, specifically within the functions responsible for adding namespace and namespace head character devices. This vulnerability stems from an incorrect handling of object lifecycles when initialization routines fail partway through execution. The core issue involves double-freeing or underflowing reference counts on kernel objects representing NVMe namespaces, which can lead to use-after-free conditions and subsequent system instability.

The technical flaw originates in the interaction between nvme_add_ns_cdev, nvme_add_ns_head_cdev, and nvme_cdev_add. Historically, these functions would take a reference to the namespace or namespace head before invoking nvme_cdev_add. The design intended for this reference to be released by the character device release handler, known as nvme_cdev_rel, under normal successful operation paths. However, if an error occurs during the subsequent call to cdev_device_add, such as due to memory allocation failure, the code path attempts to clean up by dropping the reference again in the caller function. This creates a scenario where the same object reference is released twice: once implicitly when nvme_cdev_add puts the device upon detecting the failure of cdev_device_add, and explicitly by the caller attempting its own cleanup logic.

This double release results in a refcount underflow, which manifests as a slab-use-after-free error detected via Kernel Address Sanitizer (KASAN). The vulnerability allows for potential denial-of-service conditions where kernel memory corruption occurs due to accessing freed memory structures. In practical scenarios involving NVMe over loop controllers with native multipath configurations, deleting the controller triggers this bug path, leading to crashes or undefined behavior within the kernel space.

The remediation involves restructuring how references are managed during device addition. The fix moves the reference acquisition into nvme_cdev_add itself, placing it immediately before cdev_device_add is called. This ensures that only one entity manages the lifecycle of the object throughout the initialization process. Consequently, the caller functions no longer take or drop this specific reference, eliminating the possibility of double release. Additionally, a helper function named nvme_is_ns_cdev was introduced to allow shared checks between nvme_cdev_rel and nvme_cdev_add, ensuring consistent state verification without redundant logic.

From a classification perspective, this vulnerability aligns with CWE-415 Double Free, as the root cause is releasing memory or object references more than once. It also relates to CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization if race conditions were involved in reference counting, though here it is primarily an execution flow error leading to resource management failure. In terms of MITRE ATT&CK techniques, this represents a potential path for Denial of Service (T1499) through kernel instability, although exploitation typically requires local access and specific hardware configurations like NVMe over loop devices with multipath enabled.

Mitigation strategies primarily involve applying the upstream Linux kernel patch that corrects the reference counting logic in the NVMe subsystem. System administrators should ensure their kernels are updated to versions containing this fix. For environments where immediate patching is not feasible, restricting access to NVMe device management interfaces and avoiding operations on loop-based controllers during high-load or error-prone states may reduce exposure risk. Continuous monitoring for kernel oops messages related to slab-use-after-free in nvme_put_ns_head can help detect instances of this vulnerability being triggered before catastrophic failure occurs.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00156

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!