CVE-2024-56531: ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
In the Linux kernel, the following vulnerability has been resolved:
ALSA: caiaq: Use sndcardfreewhenclosed() at disconnection
The USB disconnect callback is supposed to be short and not too-long waiting. OTOH, the current code uses sndcardfree() at disconnection, but this waits for the close of all used fds, hence it can take long. It eventually blocks the upper layer USB ioctls, which may trigger a soft lockup.
An easy workaround is to replace sndcardfree() with sndcardfreewhenclosed(). This variant returns immediately while the release of resources is done asynchronously by the card device release at the last close.
This patch also splits the code to the disconnect and the free phases; the former is called immediately at the USB disconnect callback while the latter is called from the card destructor.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
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.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Configuration
At USB disconnect, replace snd_card_free() with snd_card_free_when_closed() so the disconnect callback returns immediately and does not wait for close of all used fds (avoids blocking upper-layer USB ioctls/soft lockup).
ALSA caiaq (Linux kernel driver) snd_card_free() usage = Replace snd_card_free() with snd_card_free_when_closed()
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56531?
CVE-2024-56531 is classified as a moderate severity vulnerability in the Linux kernel.
How do I fix CVE-2024-56531?
To fix CVE-2024-56531, update to one of the following Linux kernel versions: 6.1.123-1, 6.1.128-1, 6.12.12-1, or 6.12.15-1.
Which Linux kernel versions are affected by CVE-2024-56531?
CVE-2024-56531 affects Linux kernel versions up to and including 5.10.226-1.
What components does CVE-2024-56531 affect?
CVE-2024-56531 affects the ALSA driver component in the Linux kernel, particularly related to USB disconnect handling.
Is there a workaround for CVE-2024-56531?
There is no official workaround for CVE-2024-56531; the recommended approach is to apply the available updates.