ALSA: usb-audio: Add sanity check for OOB writes at silencing
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c75a8a7ae565d7cd9baa87a504ba9162e355b4b0 · < ccaf9296763be4f76b59e2cac377006016c34435| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usb-audio: Add sanity check for OOB writes at silencing
At silencing the playback URB packets in the implicit fb mode before the actual playback, we blindly assume that the received packets fit with the buffer size. But when the setup in the capture stream differs from the playback stream (e.g. due to the USB core limitation of max packet size), such an inconsistency may lead to OOB writes to the buffer, resulting in a crash.
For addressing it, add a sanity check of the transfer buffer size at prepare_silent_urb(), and stop the data copy if the received data overflows. Also, report back the transfer error properly from there, too.
Note that this doesn't fix the root cause of the playback error itself, but this merely covers the kernel Oops.
From the CVE record · Linux
The Linux kernel’s ALSA usb-audio driver can write beyond a buffer while silencing playback packets in implicit feedback mode. If the capture and playback stream setups differ, this can cause a kernel crash. The input does not specify an authentication requirement or user interaction.
Engineers running Linux kernels with ALSA usb-audio should check whether their kernel includes this fix; affected versions are not specified.