CVE-2024-26757: md: Don't ignore read-only array in md_check_recovery()
In the Linux kernel, the following vulnerability has been resolved:
md: Don't ignore read-only array in md_check_recovery()
Usually if the array is not read-write, md_check_recovery() won't
register new sync_thread in the first place. And if the array is
read-write and sync_thread is registered, md_set_readonly() will
unregister sync_thread before setting the array read-only. md/raid
follow this behavior hence there is no problem.
After commit f52f5c71f3d4 ("md: fix stopping sync thread"), following
hang can be triggered by test shell/integrity-caching.sh:
1) array is read-only. dm-raid update super block:
rs_update_sbs
ro = mddev->ro
mddev->ro = 0
-> set array read-write
md_update_sb
2) register new sync thread concurrently.
3) dm-raid set array back to read-only:
rs_update_sbs
mddev->ro = ro
4) stop the array:
raid_dtr
md_stop
stop_sync_thread
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
md_wakeup_thread_directly(mddev->sync_thread);
wait_event(..., !test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
5) sync thread done:
md_do_sync
set_bit(MD_RECOVERY_DONE, &mddev->recovery);
md_wakeup_thread(mddev->thread);
6) daemon thread can't unregister sync thread:
md_check_recovery
if (!md_is_rdwr(mddev) &&
!test_bit(MD_RECOVERY_NEEDED, &mddev->recovery))
return;
-> -> MD_RECOVERY_RUNNING can't be cleared, hence step 4 hang;
The root cause is that dm-raid manipulate 'mddev->ro' by itself,
however, dm-raid really should stop sync thread before setting the
array read-only. Unfortunately, I need to read more code before I
can refacter the handler of 'mddev->ro' in dm-raid, hence let's fix
the problem the easy way for now to prevent dm-raid regression.
Security readout for executives and security teams
Plain-English summary
This Linux kernel flaw can make certain RAID storage operations hang, creating an availability risk. It requires local privileges and affects systems using md RAID or dm-raid behavior on affected kernels. The sources do not indicate data theft, data modification, remote exploitation, or active exploitation.
Executive priority
Treat this as a targeted availability risk for Linux storage infrastructure, not a broad remote-compromise emergency. Prioritize patching where affected RAID configurations support critical services or recovery operations.
Technical view
In md_check_recovery(), a read-only array path can skip unregistering a sync thread after dm-raid temporarily toggles mddev->ro. MD_RECOVERY_RUNNING may remain set, causing md_stop to wait indefinitely. The vulnerability is classified as CWE-404 with CVSS 5.5, reflecting local, low-complexity, privileged availability impact.
Likely exposure
Exposure is most likely on Linux systems using md RAID or dm-raid arrays with affected kernel versions. Internet-facing status is not the key factor; local access and storage stack configuration matter more. Systems without affected RAID functionality are less likely to be exposed.
Exploitation context
No CISA KEV listing is provided, and the source bundle does not cite active exploitation. The CVSS vector indicates local access with low privileges, no user interaction, and high availability impact only. Evidence supports a denial-of-service style hang, not confidentiality or integrity compromise.
Researcher notes
The root issue is a recovery-state cleanup gap when dm-raid manipulates mddev->ro directly. The public description ties the regression to commit f52f5c71f3d4 and fixes the behavior in md_check_recovery(). Source evidence is sufficient for availability impact, but not for exploit prevalence.
Mitigation direction
Apply vendor kernel updates that include the referenced stable fixes.
Prioritize hosts using md RAID or dm-raid for production storage.
Check Linux distribution advisories for backported fixes and package names.
Restrict unnecessary local shell access on storage-sensitive systems.
Plan maintenance windows for kernel updates on affected RAID hosts.
Validation and detection
Inventory Linux kernel versions across servers and appliances.
Identify hosts using md RAID or dm-raid arrays.
Confirm whether installed kernels include the referenced stable commits.
Review operational records for hangs during RAID stop or update workflows.
Track vendor advisory status for each affected Linux distribution.
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-404: 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-404 · source CWE mapping
Improper Resource Shutdown or Release
Improper Resource Shutdown or Release represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.