CVE-2025-21850: nvmet: Fix crash when a namespace is disabled
In the Linux kernel, the following vulnerability has been resolved:
nvmet: Fix crash when a namespace is disabled
The namespace percpu counter protects pending I/O, and we can
only safely diable the namespace once the counter drop to zero.
Otherwise we end up with a crash when running blktests/nvme/058
(eg for loop transport):
[ 2352.930426] [ T53909] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN PTI
[ 2352.930431] [ T53909] KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
[ 2352.930434] [ T53909] CPU: 3 UID: 0 PID: 53909 Comm: kworker/u16:5 Tainted: G W 6.13.0-rc6 #232
[ 2352.930438] [ T53909] Tainted: [W]=WARN
[ 2352.930440] [ T53909] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-3.fc41 04/01/2014
[ 2352.930443] [ T53909] Workqueue: nvmet-wq nvme_loop_execute_work [nvme_loop]
[ 2352.930449] [ T53909] RIP: 0010:blkcg_set_ioprio+0x44/0x180
as the queue is already torn down when calling submit_bio();
So we need to init the percpu counter in nvmet_ns_enable(), and
wait for it to drop to zero in nvmet_ns_disable() to avoid having
I/O pending after the namespace has been disabled.
Security readout for executives and security teams
Plain-English summary
This Linux kernel flaw can crash systems using the NVMe target subsystem when a namespace is disabled while I/O is still pending. The known impact is availability loss, not data theft or privilege escalation. It requires local privileges according to the CVSS vector.
Executive priority
Handle in normal vulnerability management cycles, with higher priority for storage infrastructure using Linux NVMe target features. The business risk is service interruption from kernel crashes, not confirmed compromise.
Technical view
The nvmet namespace pending-I/O percpu counter did not prevent namespace teardown while I/O remained active. The source describes a crash when submit_bio() is reached after the queue has been torn down. The fix initializes the counter on enable and waits for it to drain on disable.
Likely exposure
Exposure is most relevant to Linux systems running affected 6.13-series kernels and using the NVMe target subsystem. The bundle lists Linux 6.13 through 6.13.5 as affected and 6.14 as the upper boundary context.
Exploitation context
The bundle does not show active exploitation, and KEV is false. The described crash was observed during blktests/nvme/058, including loop transport. Treat this as a local availability risk until vendor advisories say otherwise.
Researcher notes
Evidence is limited to the CVE record and Linux stable fix references. The source describes a race-like teardown condition around pending I/O and namespace disable. No public weaponization or remote attack path is supported by the provided sources.
Mitigation direction
Apply vendor kernel updates that include the referenced stable fixes.
Check distribution guidance for exact fixed package versions.
Prioritize hosts using nvmet or NVMe target namespace operations.
Plan maintenance for systems where kernel updates require reboot.
Monitor for kernel Oops events involving nvmet-wq or nvme_loop.
Validation and detection
Inventory Linux hosts running affected 6.13-series kernels.
Confirm whether nvmet or NVMe target functionality is enabled.
Verify installed kernels include the referenced stable commits.
Review kernel logs for crashes during namespace disable operations.
Track vendor advisories for backported fix confirmation.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-835: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-835 · source CWE mapping
Loop with Unreachable Exit Condition ('Infinite Loop')
Loop with Unreachable Exit Condition ('Infinite Loop') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.