Skip to main content

CVE-2025-21850: Vulnerability in Linux Linux

High
VulnerabilityCVE-2025-21850cvecve-2025-21850
Published: Wed Mar 12 2025 (03/12/2025, 09:42:05 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

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.

AI-Powered Analysis

AILast updated: 06/30/2025, 09:56:10 UTC

Technical Analysis

CVE-2025-21850 is a vulnerability identified in the Linux kernel's NVMe target (nvmet) subsystem, specifically related to the handling of namespaces. The issue arises when a namespace is disabled while there are still pending I/O operations associated with it. The vulnerability is due to improper synchronization and lifecycle management of the namespace's per-CPU counter that tracks pending I/O. If the namespace is disabled before this counter drops to zero, it leads to a use-after-free or null pointer dereference condition, causing a kernel crash (general protection fault). The crash occurs because the I/O queue is torn down prematurely, and subsequent I/O submissions attempt to access invalid memory. This was demonstrated in kernel tests (blktests/nvme/058) involving the loop transport. The fix involves initializing the per-CPU counter in the nvmet_ns_enable() function and ensuring that nvmet_ns_disable() waits for the counter to reach zero before fully disabling the namespace, thus preventing any pending I/O after the namespace is disabled. This vulnerability affects Linux kernel versions around 6.13.0-rc6 and likely other versions using the vulnerable nvmet code. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations relying on Linux servers, particularly those using NVMe over Fabrics (NVMe-oF) or the Linux NVMe target subsystem for storage virtualization or high-performance storage networking, this vulnerability could lead to unexpected kernel crashes and system instability. Such crashes can cause denial of service (DoS), disrupting critical services and applications dependent on stable storage access. In environments like data centers, cloud providers, or enterprises with heavy storage workloads, this could result in downtime, data unavailability, and operational disruption. Although the vulnerability does not directly lead to privilege escalation or data leakage, the loss of availability and potential data corruption risks during crashes can have significant operational and financial impacts. The lack of known exploits reduces immediate risk, but the vulnerability’s presence in the kernel means that unpatched systems remain susceptible to accidental or malicious triggering of kernel panics, especially under workloads that disable namespaces dynamically.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2025-21850. Specifically, they should upgrade to kernel versions released after the fix was merged (post 6.13.0-rc6 or corresponding stable releases). For environments where immediate kernel upgrades are challenging, administrators should audit and limit the use of dynamic namespace disabling in NVMe target configurations to avoid triggering the vulnerable code path. Monitoring kernel logs for Oops or general protection faults related to nvmet can help detect exploitation attempts or accidental triggers. Additionally, organizations should implement robust backup and recovery procedures to mitigate the impact of potential crashes. Testing kernel updates in staging environments before production deployment is recommended to ensure compatibility and stability. Finally, maintaining an inventory of systems using NVMe target functionality will help prioritize patching efforts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.779Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9832c4522896dcbe89de

Added to database: 5/21/2025, 9:09:06 AM

Last enriched: 6/30/2025, 9:56:10 AM

Last updated: 8/13/2025, 7:25:53 AM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats