Skip to main content

CVE-2024-43855: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-43855cvecve-2024-43855
Published: Sat Aug 17 2024 (08/17/2024, 09:22:11 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: md: fix deadlock between mddev_suspend and flush bio Deadlock occurs when mddev is being suspended while some flush bio is in progress. It is a complex issue. T1. the first flush is at the ending stage, it clears 'mddev->flush_bio' and tries to submit data, but is blocked because mddev is suspended by T4. T2. the second flush sets 'mddev->flush_bio', and attempts to queue md_submit_flush_data(), which is already running (T1) and won't execute again if on the same CPU as T1. T3. the third flush inc active_io and tries to flush, but is blocked because 'mddev->flush_bio' is not NULL (set by T2). T4. mddev_suspend() is called and waits for active_io dec to 0 which is inc by T3. T1 T2 T3 T4 (flush 1) (flush 2) (third 3) (suspend) md_submit_flush_data mddev->flush_bio = NULL; . . md_flush_request . mddev->flush_bio = bio . queue submit_flushes . . . . md_handle_request . . active_io + 1 . . md_flush_request . . wait !mddev->flush_bio . . . . mddev_suspend . . wait !active_io . . . submit_flushes . queue_work md_submit_flush_data . //md_submit_flush_data is already running (T1) . md_handle_request wait resume The root issue is non-atomic inc/dec of active_io during flush process. active_io is dec before md_submit_flush_data is queued, and inc soon after md_submit_flush_data() run. md_flush_request active_io + 1 submit_flushes active_io - 1 md_submit_flush_data md_handle_request active_io + 1 make_request active_io - 1 If active_io is dec after md_handle_request() instead of within submit_flushes(), make_request() can be called directly intead of md_handle_request() in md_submit_flush_data(), and active_io will only inc and dec once in the whole flush process. Deadlock will be fixed. Additionally, the only difference between fixing the issue and before is that there is no return error handling of make_request(). But after previous patch cleaned md_write_start(), make_requst() only return error in raid5_make_request() by dm-raid, see commit 41425f96d7aa ("dm-raid456, md/raid456: fix a deadlock for dm-raid456 while io concurrent with reshape)". Since dm always splits data and flush operation into two separate io, io size of flush submitted by dm always is 0, make_request() will not be called in md_submit_flush_data(). To prevent future modifications from introducing issues, add WARN_ON to ensure make_request() no error is returned in this context.

AI-Powered Analysis

AILast updated: 06/27/2025, 20:58:48 UTC

Technical Analysis

CVE-2024-43855 is a concurrency-related vulnerability in the Linux kernel's md (multiple device) subsystem, which manages software RAID arrays. The flaw arises from a deadlock condition triggered during the suspension of an md device while flush bio operations are in progress. Specifically, the issue involves non-atomic increment and decrement operations on the active_io counter during the flush process. The vulnerability manifests when multiple flush operations and a suspend operation interleave in a way that causes circular waiting: flush operations wait on the device suspension to complete, while the suspension waits for flush operations to finish, resulting in a deadlock. The root cause is the improper handling of active_io increments and decrements around the md_submit_flush_data() function and related bio flush requests. The patch resolves this by adjusting the timing of active_io counter modifications to ensure atomicity and prevent the deadlock. Additionally, the fix includes a WARN_ON check to detect unexpected errors from make_request() calls in this context, ensuring future code changes do not reintroduce the issue. This vulnerability affects multiple recent Linux kernel versions identified by specific commit hashes. Although complex, the deadlock can cause the md device to hang indefinitely during suspend operations, impacting system stability and availability. There are no known exploits in the wild at this time, and no CVSS score has been assigned yet.

Potential Impact

For European organizations relying on Linux-based systems with software RAID configurations (md devices), this vulnerability poses a risk of system hangs or unresponsiveness during device suspension events, such as during system shutdowns, hibernations, or manual device suspends. This can lead to denial of service conditions affecting critical infrastructure, data centers, and enterprise servers. The impact is primarily on availability, as the deadlock prevents normal device operation and can require manual intervention or system reboot to recover. Organizations with high-availability requirements or those running storage-intensive workloads on Linux servers are particularly vulnerable. While confidentiality and integrity are not directly impacted, the disruption of storage services can have cascading effects on business operations, data processing, and service delivery. Given the widespread use of Linux in European public sector, financial institutions, and cloud service providers, the vulnerability could affect a broad range of critical systems if unpatched. The absence of known exploits reduces immediate risk, but the complexity of the issue and its potential to cause system outages warrant prompt attention.

Mitigation Recommendations

1. Apply the official Linux kernel patches that address CVE-2024-43855 as soon as they become available from trusted sources or Linux distribution vendors. 2. For organizations unable to immediately patch, consider temporarily avoiding md device suspension operations or scheduling them during maintenance windows to minimize impact. 3. Monitor system logs for WARN_ON messages related to make_request() errors in md_submit_flush_data(), which may indicate attempts to trigger the deadlock or related issues. 4. Implement robust system monitoring and alerting to detect hangs or unresponsiveness in storage subsystems, enabling rapid response. 5. Test kernel updates in staging environments to ensure compatibility and stability before deployment in production. 6. Review RAID configurations and usage patterns to identify systems where md device suspensions are frequent or critical, prioritizing patching accordingly. 7. Engage with Linux distribution security advisories and subscribe to relevant mailing lists for timely updates on patches and mitigations. 8. Consider fallback or redundancy mechanisms in storage infrastructure to mitigate potential downtime caused by this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-08-17T09:11:59.278Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdcd55

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

Last enriched: 6/27/2025, 8:58:48 PM

Last updated: 8/6/2025, 2:06:50 PM

Views: 15

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