CVE-2024-38600
Linux ALSA Deadlock Vulnerability
Description
In the Linux kernel, the following vulnerability has been resolved: ALSA: Fix deadlocks with kctl removals at disconnection In snd_card_disconnect(), we set card->shutdown flag at the beginning, call callbacks and do sync for card->power_ref_sleep waiters at the end. The callback may delete a kctl element, and this can lead to a deadlock when the device was in the suspended state. Namely: * A process waits for the power up at snd_power_ref_and_wait() in snd_ctl_info() or read/write() inside card->controls_rwsem. * The system gets disconnected meanwhile, and the driver tries to delete a kctl via snd_ctl_remove*(); it tries to take card->controls_rwsem again, but this is already locked by the above. Since the sleeper isn't woken up, this deadlocks. An easy fix is to wake up sleepers before processing the driver disconnect callbacks but right after setting the card->shutdown flag. Then all sleepers will abort immediately, and the code flows again. So, basically this patch moves the wait_event() call at the right timing. While we're at it, just to be sure, call wait_event_all() instead of wait_event(), although we don't use exclusive events on this queue for now.
INFO
Published Date :
June 19, 2024, 2:15 p.m.
Last Modified :
Aug. 27, 2024, 4:02 p.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
3.6
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-38600
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-38600
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-38600
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Aug. 27, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Changed Reference Type https://git.kernel.org/stable/c/2f103287ef7960854808930499d1181bd0145d68 No Types Assigned https://git.kernel.org/stable/c/2f103287ef7960854808930499d1181bd0145d68 Patch Changed Reference Type https://git.kernel.org/stable/c/6b55e879e7bd023a03888fc6c8339edf82f576f4 No Types Assigned https://git.kernel.org/stable/c/6b55e879e7bd023a03888fc6c8339edf82f576f4 Patch Changed Reference Type https://git.kernel.org/stable/c/87988a534d8e12f2e6fc01fe63e6c1925dc5307c No Types Assigned https://git.kernel.org/stable/c/87988a534d8e12f2e6fc01fe63e6c1925dc5307c Patch Changed Reference Type https://git.kernel.org/stable/c/88ce3fe255d58a93624b467af036dc3519f309c7 No Types Assigned https://git.kernel.org/stable/c/88ce3fe255d58a93624b467af036dc3519f309c7 Patch Changed Reference Type https://git.kernel.org/stable/c/c2fb439f4f1425a961d20bec818fed2c2d9ef70a No Types Assigned https://git.kernel.org/stable/c/c2fb439f4f1425a961d20bec818fed2c2d9ef70a Patch Changed Reference Type https://git.kernel.org/stable/c/ff80185e7b7b547a0911fcfc8aefc61c3e8304d7 No Types Assigned https://git.kernel.org/stable/c/ff80185e7b7b547a0911fcfc8aefc61c3e8304d7 Patch Added CWE NIST CWE-667 Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions up to (excluding) 5.15.161 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.1.93 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.33 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.8.12 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.9 up to (excluding) 6.9.3 -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 19, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: ALSA: Fix deadlocks with kctl removals at disconnection In snd_card_disconnect(), we set card->shutdown flag at the beginning, call callbacks and do sync for card->power_ref_sleep waiters at the end. The callback may delete a kctl element, and this can lead to a deadlock when the device was in the suspended state. Namely: * A process waits for the power up at snd_power_ref_and_wait() in snd_ctl_info() or read/write() inside card->controls_rwsem. * The system gets disconnected meanwhile, and the driver tries to delete a kctl via snd_ctl_remove*(); it tries to take card->controls_rwsem again, but this is already locked by the above. Since the sleeper isn't woken up, this deadlocks. An easy fix is to wake up sleepers before processing the driver disconnect callbacks but right after setting the card->shutdown flag. Then all sleepers will abort immediately, and the code flows again. So, basically this patch moves the wait_event() call at the right timing. While we're at it, just to be sure, call wait_event_all() instead of wait_event(), although we don't use exclusive events on this queue for now. Added Reference kernel.org https://git.kernel.org/stable/c/ff80185e7b7b547a0911fcfc8aefc61c3e8304d7 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/c2fb439f4f1425a961d20bec818fed2c2d9ef70a [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/2f103287ef7960854808930499d1181bd0145d68 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/88ce3fe255d58a93624b467af036dc3519f309c7 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/6b55e879e7bd023a03888fc6c8339edf82f576f4 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/87988a534d8e12f2e6fc01fe63e6c1925dc5307c [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-38600
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-38600
weaknesses.