CVE-2024-50135: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: nvme-pci: fix race condition between reset and nvme_dev_disable() nvme_dev_disable() modifies the dev->online_queues field, therefore nvme_pci_update_nr_queues() should avoid racing against it, otherwise we could end up passing invalid values to blk_mq_update_nr_hw_queues(). WARNING: CPU: 39 PID: 61303 at drivers/pci/msi/api.c:347 pci_irq_get_affinity+0x187/0x210 Workqueue: nvme-reset-wq nvme_reset_work [nvme] RIP: 0010:pci_irq_get_affinity+0x187/0x210 Call Trace: <TASK> ? blk_mq_pci_map_queues+0x87/0x3c0 ? pci_irq_get_affinity+0x187/0x210 blk_mq_pci_map_queues+0x87/0x3c0 nvme_pci_map_queues+0x189/0x460 [nvme] blk_mq_update_nr_hw_queues+0x2a/0x40 nvme_reset_work+0x1be/0x2a0 [nvme] Fix the bug by locking the shutdown_lock mutex before using dev->online_queues. Give up if nvme_dev_disable() is running or if it has been executed already.
AI Analysis
Technical Summary
CVE-2024-50135 is a race condition vulnerability identified in the Linux kernel's NVMe PCI driver subsystem. The issue arises from a concurrency problem between the nvme_dev_disable() function and nvme_pci_update_nr_queues(). Specifically, nvme_dev_disable() modifies the dev->online_queues field, which tracks the number of active queues for an NVMe device. Meanwhile, nvme_pci_update_nr_queues() reads this field to update hardware queue counts via blk_mq_update_nr_hw_queues(). Without proper synchronization, these two operations can race, leading to inconsistent or invalid values being passed to blk_mq_update_nr_hw_queues(). This can cause kernel warnings or errors, such as the observed warning at pci_irq_get_affinity in the MSI API, and potentially lead to system instability or crashes. The root cause is the lack of locking around the shared dev->online_queues field during shutdown or reset operations. The fix involves acquiring the shutdown_lock mutex before accessing dev->online_queues, ensuring that if nvme_dev_disable() is running or has completed, nvme_pci_update_nr_queues() will not proceed, thus preventing the race condition. This vulnerability affects Linux kernel versions containing the specified commit hashes prior to the patch and is relevant to systems using NVMe PCI devices. No known exploits are reported in the wild yet, and no CVSS score has been assigned at the time of publication.
Potential Impact
For European organizations, the impact of CVE-2024-50135 could be significant in environments relying heavily on Linux servers with NVMe PCI storage devices, such as data centers, cloud providers, and enterprises running high-performance computing workloads. The race condition can cause kernel warnings and potentially lead to system instability or crashes during NVMe device resets or shutdowns, which may result in service interruptions or data unavailability. While this vulnerability does not directly lead to privilege escalation or data leakage, the resulting instability could disrupt critical services, impacting business continuity and operational reliability. Organizations with large-scale Linux deployments, especially those using NVMe storage for performance-sensitive applications, should be vigilant. The absence of known exploits reduces immediate risk, but the vulnerability's nature means it could be triggered unintentionally by normal device reset operations or during maintenance, causing unexpected downtime.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to the patched versions that include the fix for CVE-2024-50135. Since the vulnerability involves a race condition in the NVMe PCI driver, applying the official kernel patches or upgrading to a kernel version released after the fix is the most effective mitigation. Additionally, organizations should: 1) Monitor kernel logs for warnings related to pci_irq_get_affinity or nvme_reset_work to detect potential occurrences of this race condition. 2) Implement robust testing and validation of kernel updates in staging environments to ensure stability before production deployment. 3) For critical systems, consider scheduling maintenance windows to apply updates and reboot systems to load patched kernels. 4) If immediate patching is not feasible, minimize NVMe device resets or shutdowns during peak operational hours to reduce the chance of triggering the race condition. 5) Engage with Linux distribution vendors to obtain backported patches if using long-term support kernels. These steps go beyond generic advice by focusing on proactive monitoring, controlled update deployment, and operational adjustments tailored to the nature of this race condition.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland
CVE-2024-50135: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: nvme-pci: fix race condition between reset and nvme_dev_disable() nvme_dev_disable() modifies the dev->online_queues field, therefore nvme_pci_update_nr_queues() should avoid racing against it, otherwise we could end up passing invalid values to blk_mq_update_nr_hw_queues(). WARNING: CPU: 39 PID: 61303 at drivers/pci/msi/api.c:347 pci_irq_get_affinity+0x187/0x210 Workqueue: nvme-reset-wq nvme_reset_work [nvme] RIP: 0010:pci_irq_get_affinity+0x187/0x210 Call Trace: <TASK> ? blk_mq_pci_map_queues+0x87/0x3c0 ? pci_irq_get_affinity+0x187/0x210 blk_mq_pci_map_queues+0x87/0x3c0 nvme_pci_map_queues+0x189/0x460 [nvme] blk_mq_update_nr_hw_queues+0x2a/0x40 nvme_reset_work+0x1be/0x2a0 [nvme] Fix the bug by locking the shutdown_lock mutex before using dev->online_queues. Give up if nvme_dev_disable() is running or if it has been executed already.
AI-Powered Analysis
Technical Analysis
CVE-2024-50135 is a race condition vulnerability identified in the Linux kernel's NVMe PCI driver subsystem. The issue arises from a concurrency problem between the nvme_dev_disable() function and nvme_pci_update_nr_queues(). Specifically, nvme_dev_disable() modifies the dev->online_queues field, which tracks the number of active queues for an NVMe device. Meanwhile, nvme_pci_update_nr_queues() reads this field to update hardware queue counts via blk_mq_update_nr_hw_queues(). Without proper synchronization, these two operations can race, leading to inconsistent or invalid values being passed to blk_mq_update_nr_hw_queues(). This can cause kernel warnings or errors, such as the observed warning at pci_irq_get_affinity in the MSI API, and potentially lead to system instability or crashes. The root cause is the lack of locking around the shared dev->online_queues field during shutdown or reset operations. The fix involves acquiring the shutdown_lock mutex before accessing dev->online_queues, ensuring that if nvme_dev_disable() is running or has completed, nvme_pci_update_nr_queues() will not proceed, thus preventing the race condition. This vulnerability affects Linux kernel versions containing the specified commit hashes prior to the patch and is relevant to systems using NVMe PCI devices. No known exploits are reported in the wild yet, and no CVSS score has been assigned at the time of publication.
Potential Impact
For European organizations, the impact of CVE-2024-50135 could be significant in environments relying heavily on Linux servers with NVMe PCI storage devices, such as data centers, cloud providers, and enterprises running high-performance computing workloads. The race condition can cause kernel warnings and potentially lead to system instability or crashes during NVMe device resets or shutdowns, which may result in service interruptions or data unavailability. While this vulnerability does not directly lead to privilege escalation or data leakage, the resulting instability could disrupt critical services, impacting business continuity and operational reliability. Organizations with large-scale Linux deployments, especially those using NVMe storage for performance-sensitive applications, should be vigilant. The absence of known exploits reduces immediate risk, but the vulnerability's nature means it could be triggered unintentionally by normal device reset operations or during maintenance, causing unexpected downtime.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernel to the patched versions that include the fix for CVE-2024-50135. Since the vulnerability involves a race condition in the NVMe PCI driver, applying the official kernel patches or upgrading to a kernel version released after the fix is the most effective mitigation. Additionally, organizations should: 1) Monitor kernel logs for warnings related to pci_irq_get_affinity or nvme_reset_work to detect potential occurrences of this race condition. 2) Implement robust testing and validation of kernel updates in staging environments to ensure stability before production deployment. 3) For critical systems, consider scheduling maintenance windows to apply updates and reboot systems to load patched kernels. 4) If immediate patching is not feasible, minimize NVMe device resets or shutdowns during peak operational hours to reduce the chance of triggering the race condition. 5) Engage with Linux distribution vendors to obtain backported patches if using long-term support kernels. These steps go beyond generic advice by focusing on proactive monitoring, controlled update deployment, and operational adjustments tailored to the nature of this race condition.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-10-21T19:36:19.955Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9825c4522896dcbe0061
Added to database: 5/21/2025, 9:08:53 AM
Last enriched: 6/28/2025, 5:40:02 PM
Last updated: 7/26/2025, 4:28:22 PM
Views: 8
Related Threats
CVE-2025-6572: CWE-79 Cross-Site Scripting (XSS) in OpenStreetMap for Gutenberg and WPBakery Page Builder (formerly Visual Composer)
HighCVE-2025-54959: Improper limitation of a pathname to a restricted directory ('Path Traversal') in Mubit co.,ltd. Powered BLUE 870
MediumCVE-2025-54958: Improper neutralization of special elements used in an OS command ('OS Command Injection') in Mubit co.,ltd. Powered BLUE 870
MediumCVE-2025-54940: Code injection in WPEngine, Inc. Advanced Custom Fields
LowCVE-2025-8708: Deserialization in Antabot White-Jotter
LowActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.