{"id":"CVE-2024-26899","published":"2024-04-17T10:27:49Z","modified":"2026-05-11T20:06:34Z","title":"block: fix deadlock between bd_link_disk_holder and partition scan","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nblock: fix deadlock between bd_link_disk_holder and partition scan\n\n'open_mutex' of gendisk is used to protect open/close block devices. But\nin bd_link_disk_holder(), it is used to protect the creation of symlink\nbetween holding disk and slave bdev, which introduces some issues.\n\nWhen bd_link_disk_holder() is called, the driver is usually in the process\nof initialization/modification and may suspend submitting io. At this\ntime, any io hold 'open_mutex', such as scanning partitions, can cause\ndeadlocks. For example, in raid:\n\nT1                              T2\nbdev_open_by_dev\n lock open_mutex [1]\n ...\n  efi_partition\n  ...\n   md_submit_bio\n\t\t\t\tmd_ioctl mddev_syspend\n\t\t\t\t  -> suspend all io\n\t\t\t\t md_add_new_disk\n\t\t\t\t  bind_rdev_to_array\n\t\t\t\t   bd_link_disk_holder\n\t\t\t\t    try lock open_mutex [2]\n    md_handle_request\n     -> wait mddev_resume\n\nT1 scan partition, T2 add a new device to raid. T1 waits for T2 to resume\nmddev, but T2 waits for open_mutex held by T1. Deadlock occurs.\n\nFix it by introducing a local mutex 'blk_holder_mutex' to replace\n'open_mutex'.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0021,"percentile":0.11459,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62","tags":[]},{"url":"https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98","tags":[]},{"url":"https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75","tags":[]}],"priority":{"score":2.3,"factors":[{"name":"EPSS percentile","points":2.29}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 1b0a2d950ee2a54aa04fb31ead32144be0bbf690, < 1e5c5b0abaee7b62a10b9707a62083b71ad21f62",">= 1b0a2d950ee2a54aa04fb31ead32144be0bbf690, < 5a87c1f7993bc8ac358a3766bac5dc7126e01e98",">= 1b0a2d950ee2a54aa04fb31ead32144be0bbf690, < 03f12122b20b6e6028e9ed69030a49f9cffcbb75"]},{"vendor":"Linux","product":"Linux","versions":["6.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-06-12T16:21:25.318881Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-24161","exploited":false,"provenance":"source"}}