Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98815 Overview
CVE-2026-98815 is a use-after-free vulnerability in the Linux kernel's NVMe (Non-Volatile Memory Express) subsystem. The flaw resides in the character device (cdev) lifetime management for NVMe namespace heads operating in multipath mode. When the kernel tears down an NVMe NS head via nvme_cdev_del(), already-open file descriptors remain callable even after the backing nvme_ns_head structure is freed. A local user holding an open file descriptor to /dev/ngXnY during controller teardown can trigger a slab use-after-free, as confirmed by KASAN reports showing reads against freed memory in cdev_put.part.0.
Critical Impact
Local use-after-free in the NVMe character device path can lead to kernel memory corruption, denial of service, or potential privilege escalation on systems with NVMe multipath devices exposed to unprivileged users.
Affected Products
- Linux kernel NVMe subsystem (drivers/nvme/host)
- Systems using NVMe multipath with character device (ng*) interfaces
- Distributions shipping affected upstream kernel versions prior to the referenced fix commits
Discovery Timeline
- 2026-10-18 - CVE-2026-98815 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98815
Vulnerability Analysis
The NVMe NS head character device uses .open and .release file operations to take and release references on the nvme_ns_head structure. These references are intended to keep the structure alive while user-space file descriptors remain open against the cdev. In multipath mode, teardown calls nvme_cdev_del() which invokes cdev_device_del() and ultimately cdev_del().
The flaw stems from an incorrect assumption about cdev_del() semantics. After cdev_del() returns, open file descriptors that already reference the cdev remain valid, and their file operations are still callable. Consequently, when the final close() syscall executes, the kernel calls __fput() and cdev_put() against a cdev whose embedding nvme_ns_head structure has already been freed by nvme_ns_head_chr_release().
The KASAN report confirms the sequence: nvme_alloc_ns() allocates the structure, teardown frees it through kfree() in nvme_ns_head_chr_release(), and the subsequent __x64_sys_close() path dereferences the freed object inside cdev_put.part.0. This is a classic Use-After-Free [CWE-416] in a kernel driver.
Root Cause
The NVMe multipath cdev teardown logic does not account for the fact that cdev_del() only unregisters the cdev from the system — it does not wait for or invalidate existing open file descriptors. The reference counting on nvme_ns_head is unbalanced against the actual lifetime of the embedded struct cdev, allowing the parent allocation to be released while live cdev references still exist.
Attack Vector
A local attacker with read access to an NVMe character device (/dev/ngXnY) opens the device, holds the file descriptor, and waits for controller teardown or namespace removal. When the teardown path frees the nvme_ns_head, the next operation on the held file descriptor — including an ordinary close() — triggers access to freed slab memory. The attack requires local access and the ability to trigger or wait for an NVMe teardown event. See the upstream commits 98b09ad and 9952f38 for the corrected lifetime handling.
Detection Methods for CVE-2026-98815
Indicators of Compromise
- KASAN slab-use-after-free reports referencing cdev_put.part.0, nvme_ns_head_chr_release, or __fput in kernel logs
- Unexpected kernel oopses or panics correlated with NVMe controller removal or namespace rescans
- Processes holding long-lived open handles to /dev/ng* character devices during controller teardown events
Detection Strategies
- Enable KASAN on test and staging kernels to surface the use-after-free before production exposure.
- Audit kernel ring buffer (dmesg) and /var/log/kern.log for stack traces mentioning nvme_ns_head_chr_release or cdev_put after nvme_remove operations.
- Monitor NVMe controller lifecycle events through udev and correlate with processes holding /dev/ng* descriptors via lsof.
Monitoring Recommendations
- Centralize kernel log collection and alert on KASAN or slab corruption reports from NVMe code paths.
- Track NVMe hot-remove and multipath failover frequency, which influences exposure to this teardown race.
- Baseline which user accounts and services open NVMe character devices and alert on unexpected openers.
How to Mitigate CVE-2026-98815
Immediate Actions Required
- Apply the upstream kernel fixes from commits 98b09ad and 9952f38 once backported by your distribution.
- Restrict access to /dev/ng* NVMe character devices to privileged users and services only.
- Avoid routine NVMe controller teardown operations on production hosts until patched kernels are deployed.
Patch Information
The fix is upstream in the Linux kernel NVMe subsystem and corrects the cdev lifetime so that the nvme_ns_head structure cannot be freed while open file descriptors still reference the embedded cdev. Distribution vendors are expected to backport the referenced commits into supported stable kernel branches. Track your vendor's security advisories for the specific kernel package versions that incorporate the fix.
Workarounds
- Tighten udev rules so that NVMe character devices are owned by root:disk with mode 0660 and are not exposed to unprivileged users or containers.
- Avoid passing NVMe ng* devices into untrusted containers or virtual machines until the host kernel is patched.
- Where feasible, disable NVMe multipath on hosts that do not require it, reducing exposure to the affected code path.
# Verify kernel version and NVMe character device permissions
uname -r
ls -l /dev/ng*
# Example udev rule to restrict NVMe character device access
# /etc/udev/rules.d/99-nvme-cdev.rules
KERNEL=="ng[0-9]*n[0-9]*", MODE="0600", OWNER="root", GROUP="root"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

