CVE-2024-26899: block: fix deadlock between bd_link_disk_holder and partition scan
In the Linux kernel, the following vulnerability has been resolved:
block: fix deadlock between bdlinkdiskholder and partition scan
'openmutex' of gendisk is used to protect open/close block devices. But in bdlinkdiskholder(), it is used to protect the creation of symlink between holding disk and slave bdev, which introduces some issues.
When bdlinkdiskholder() is called, the driver is usually in the process of initialization/modification and may suspend submitting io. At this time, any io hold 'openmutex', such as scanning partitions, can cause deadlocks. For example, in raid:
T1 T2 bdevopenbydev lock openmutex [1] ... efipartition ... mdsubmitbio mdioctl mddevsyspend -> suspend all io mdaddnewdisk bindrdevtoarray bdlinkdiskholder try lock openmutex [2] mdhandlerequest -> wait mddevresume
T1 scan partition, T2 add a new device to raid. T1 waits for T2 to resume mddev, but T2 waits for openmutex held by T1. Deadlock occurs.
Fix it by introducing a local mutex 'blkholdermutex' to replace 'openmutex'.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
block: fix deadlock between bdlinkdiskholder and partition scan
The Linux kernel CVE team has assigned CVE-2024-26899 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024041745-CVE-2024-26899-3f41@gregkh/T
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.7.11 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.8.2 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.9 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.129-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.135-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.25-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.27-1 - Configuration
Introduce a local mutex named 'blk_holder_mutex' in bd_link_disk_holder and replace uses of the gendisk 'open_mutex' with this local 'blk_holder_mutex' to protect creation of symlinks between holding disk and slave bdev, preventing deadlocks between bd_link_disk_holder and partition scans.
Linux kernel (bd_link_disk_holder / gendisk) mutex used to protect creation of symlink between holding disk and slave bdev = use local mutex 'blk_holder_mutex' instead of gendisk 'open_mutex'
Event History
Frequently Asked Questions
What is the severity of CVE-2024-26899?
CVE-2024-26899 has a severity rating that indicates a potential for significant disruption due to a deadlock issue in the Linux kernel.
How do I fix CVE-2024-26899?
To fix CVE-2024-26899, upgrade your Linux kernel to versions 6.7.11, 6.8.2, 6.9, or the latest available for your distribution.
What systems are affected by CVE-2024-26899?
CVE-2024-26899 affects various versions of the Linux kernel, including those below version 6.7.11 and specific releases in the 5.10 and 6.x series.
Is CVE-2024-26899 actively being exploited?
There is currently no public information indicating active exploitation of CVE-2024-26899, but it should be addressed promptly due to its nature.
What are the symptoms of CVE-2024-26899?
Symptoms of CVE-2024-26899 may include system freezes or deadlocks related to block device operations.