Skip to main content

CVE-2024-26671: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-26671cvecve-2024-26671
Published: Tue Apr 02 2024 (04/02/2024, 06:49:13 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: blk-mq: fix IO hang from sbitmap wakeup race In blk_mq_mark_tag_wait(), __add_wait_queue() may be re-ordered with the following blk_mq_get_driver_tag() in case of getting driver tag failure. Then in __sbitmap_queue_wake_up(), waitqueue_active() may not observe the added waiter in blk_mq_mark_tag_wait() and wake up nothing, meantime blk_mq_mark_tag_wait() can't get driver tag successfully. This issue can be reproduced by running the following test in loop, and fio hang can be observed in < 30min when running it on my test VM in laptop. modprobe -r scsi_debug modprobe scsi_debug delay=0 dev_size_mb=4096 max_queue=1 host_max_queue=1 submit_queues=4 dev=`ls -d /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/* | head -1 | xargs basename` fio --filename=/dev/"$dev" --direct=1 --rw=randrw --bs=4k --iodepth=1 \ --runtime=100 --numjobs=40 --time_based --name=test \ --ioengine=libaio Fix the issue by adding one explicit barrier in blk_mq_mark_tag_wait(), which is just fine in case of running out of tag.

AI-Powered Analysis

AILast updated: 06/29/2025, 17:10:53 UTC

Technical Analysis

CVE-2024-26671 is a vulnerability identified in the Linux kernel's block multi-queue (blk-mq) subsystem, which is responsible for managing IO requests efficiently across multiple queues. The flaw arises from a race condition in the blk_mq_mark_tag_wait() function, where the call to __add_wait_queue() can be reordered relative to blk_mq_get_driver_tag() when the system fails to obtain a driver tag. This reordering can cause the __sbitmap_queue_wake_up() function to miss the newly added waiter in the wait queue, resulting in no wake-up signal being sent. Consequently, blk_mq_mark_tag_wait() fails to acquire the driver tag successfully, leading to IO operations hanging. The issue has been demonstrated to cause hangs in fio IO testing within 30 minutes on a test virtual machine. The root cause is a lack of proper memory barriers to enforce ordering between these operations. The fix involves adding an explicit memory barrier in blk_mq_mark_tag_wait() to prevent the reordering and ensure proper wake-up signaling when tags are exhausted. This vulnerability affects Linux kernel versions identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and potentially other versions with similar blk-mq implementations. No known exploits are reported in the wild as of the publication date, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running affected Linux kernel versions, especially those utilizing blk-mq for high-performance storage IO operations. The impact manifests as IO hangs, which can degrade system availability and performance, potentially causing service interruptions in critical infrastructure, cloud services, and data centers relying on Linux-based storage servers. Organizations with high IO workloads, such as financial institutions, telecommunications providers, and cloud service operators, may experience operational disruptions. While this vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant, especially in environments requiring high uptime and reliability. The lack of known exploits reduces immediate risk, but the potential for denial-of-service conditions through IO hangs warrants prompt attention. European organizations with virtualized environments or heavy use of fio or similar IO testing tools may also be more likely to detect or be affected by this issue.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should prioritize updating their Linux kernels to versions that include the patch fixing the blk-mq race condition. Kernel updates should be tested and deployed promptly, especially on systems handling critical IO workloads. Additionally, organizations should monitor IO performance and system logs for signs of IO hangs or blk-mq related errors. For environments where immediate patching is not feasible, reducing IO concurrency or adjusting blk-mq queue parameters to limit contention may help reduce the likelihood of triggering the race condition. System administrators should also review and harden their kernel update processes to ensure timely application of security patches. Finally, incorporating this vulnerability into vulnerability management and incident response plans will help prepare for potential exploitation scenarios.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-19T14:20:24.150Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982ac4522896dcbe37b2

Added to database: 5/21/2025, 9:08:58 AM

Last enriched: 6/29/2025, 5:10:53 PM

Last updated: 8/15/2025, 10:38:27 PM

Views: 16

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