{"id":"CVE-2024-26758","published":"2024-04-03T17:00:42Z","modified":"2026-05-11T20:03:36Z","title":"md: Don't ignore suspended array in md_check_recovery()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmd: Don't ignore suspended array in md_check_recovery()\n\nmddev_suspend() never stop sync_thread, hence it doesn't make sense to\nignore suspended array in md_check_recovery(), which might cause\nsync_thread can't be unregistered.\n\nAfter commit f52f5c71f3d4 (\"md: fix stopping sync thread\"), following\nhang can be triggered by test shell/integrity-caching.sh:\n\n1) suspend the array:\nraid_postsuspend\n mddev_suspend\n\n2) stop the array:\nraid_dtr\n md_stop\n  __md_stop_writes\n   stop_sync_thread\n    set_bit(MD_RECOVERY_INTR, &mddev->recovery);\n    md_wakeup_thread_directly(mddev->sync_thread);\n    wait_event(..., !test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))\n\n3) sync thread done:\nmd_do_sync\n set_bit(MD_RECOVERY_DONE, &mddev->recovery);\n md_wakeup_thread(mddev->thread);\n\n4) daemon thread can't unregister sync thread:\nmd_check_recovery\n if (mddev->suspended)\n   return; -> return directly\n md_read_sync_thread\n clear_bit(MD_RECOVERY_RUNNING, &mddev->recovery);\n -> MD_RECOVERY_RUNNING can't be cleared, hence step 2 hang;\n\nThis problem is not just related to dm-raid, fix it by ignoring\nsuspended array in md_check_recovery(). And follow up patches will\nimprove dm-raid better to frozen sync thread during suspend.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.0027,"percentile":0.1202,"provenance":"source"},"cwes":[{"id":"CWE-129","name":"Improper Validation of Array Index"}],"references":[{"url":"https://git.kernel.org/stable/c/a55f0d6179a19c6b982e2dc344d58c98647a3be0","tags":[]},{"url":"https://git.kernel.org/stable/c/1baae052cccd08daf9a9d64c3f959d8cdb689757","tags":[]}],"priority":{"score":6.3,"factors":[{"name":"EPSS percentile","points":2.4},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 68866e425be2ef2664aa5c691bb3ab789736acf5, < a55f0d6179a19c6b982e2dc344d58c98647a3be0",">= 68866e425be2ef2664aa5c691bb3ab789736acf5, < 1baae052cccd08daf9a9d64c3f959d8cdb689757"]},{"vendor":"Linux","product":"Linux","versions":["3.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-04-04T15:44:46.004126Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-24020","exploited":false,"provenance":"source"}}