ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 523f1dce37434a9a6623bf46e7893e2b4b10ac3c · < 4507a8b9b30344c5ddd8219945f446d47e966a6d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
The USB disconnect callback is supposed to be short and not too-long waiting. OTOH, the current code uses snd_card_free() 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 snd_card_free() with snd_card_free_when_closed(). 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.
From the CVE record · Linux
The Linux kernel’s ALSA caiaq USB disconnect callback can wait for open file descriptors to close, blocking USB ioctls. An attacker able to cause a disconnect while file descriptors remain open could trigger a soft lockup; the input does not specify an authentication requirement.
Anyone running a Linux kernel with the ALSA caiaq driver should check their version; affected versions are not specified.