{"id":"CVE-2024-26899","state":"PUBLISHED","title":"block: fix deadlock between bd_link_disk_holder and partition scan","description":"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'.","publishedAt":"2024-04-17T10:27:49.089Z","updatedAt":"2026-05-11T20:06:34.466Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1b0a2d950ee2a54aa04fb31ead32144be0bbf690","status":"affected","lessThan":"1e5c5b0abaee7b62a10b9707a62083b71ad21f62","versionType":"git"},{"version":"1b0a2d950ee2a54aa04fb31ead32144be0bbf690","status":"affected","lessThan":"5a87c1f7993bc8ac358a3766bac5dc7126e01e98","versionType":"git"},{"version":"1b0a2d950ee2a54aa04fb31ead32144be0bbf690","status":"affected","lessThan":"03f12122b20b6e6028e9ed69030a49f9cffcbb75","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/holder.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/holder.c"]}],"references":["https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62","https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98","https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26899.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-26899","state":"PUBLISHED","datePublished":"2024-04-17T10:27:49.089Z","dateUpdated":"2026-05-11T20:06:34.466Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-19T14:20:24.187Z"},"containers":{"cna":{"title":"block: fix deadlock between bd_link_disk_holder and partition scan","descriptions":[{"lang":"en","value":"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'."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1b0a2d950ee2a54aa04fb31ead32144be0bbf690","status":"affected","lessThan":"1e5c5b0abaee7b62a10b9707a62083b71ad21f62","versionType":"git"},{"version":"1b0a2d950ee2a54aa04fb31ead32144be0bbf690","status":"affected","lessThan":"5a87c1f7993bc8ac358a3766bac5dc7126e01e98","versionType":"git"},{"version":"1b0a2d950ee2a54aa04fb31ead32144be0bbf690","status":"affected","lessThan":"03f12122b20b6e6028e9ed69030a49f9cffcbb75","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/holder.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.7","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["block/holder.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62"},{"url":"https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98"},{"url":"https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T20:06:34.466Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.7.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.8.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.7","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-06-12T16:21:25.318881Z","id":"CVE-2024-26899","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-12T16:21:49.375Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:21:05.535Z"}}]}}}