data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2024-26757 in the interactive tracker

CVE-2024-26757

md: Don't ignore read-only array in md_check_recovery()

EPSS 0.2%

Published 2024-04-03 (3 years ago) by the Linux kernel CNA. Subsystem drivers/md. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2024-26757 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication.
Debian 13trixiefixed6.7.7-1Update the kernel and reboot. Fixed in 6.7.7-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.7.7-1Update the kernel and reboot. Fixed in 6.7.7-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.7.7-1Update the kernel and reboot. Fixed in 6.7.7-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

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.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

drivers/md/md.c

What this is
SOFTWARE RAID (Multiple Disks) SUPPORTMAINTAINERS section matched on drivers/md/md* · linux-raid@vger.kernel.org · Supported
Kernel module
md_mod

Check it on the machine

grep -wE 'CONFIG_BLK_DEV_MD|CONFIG_MD' /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w md_mod

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.

  • bookworm, trixie, forky, sidm
m
a loadable module on every flavour - check lsmod, can be blacklisted
Build switches
CONFIG_BLK_DEV_MD, CONFIG_MD
Reads as
all on means the file is compiled; any one off means it is not.

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2024-04-03 (3 years ago)source
CVSS
no vector published, unrated
Attack vector
not published
EPSS
0.21%, higher than 10.3% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
drivers/md

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
4.86.7.72ea169c5a0b1
4.86.855a48ad2db64

Why the CNA scored it this way

The kernel CNA published no CVSS vector and no reasoning for CVE-2024-26757, which is why it is shown as unrated rather than given an invented score. 6,405 of the 20,413 CVEs here carry reasoning; this is not one of them.