ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9a2fe9b801f585baccf8352d82839dcd54b300cf · < 0ee87c2814deb5e42921281116ac3abcb326880b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usb-audio: Fix out-of-bounds read in snd_usb_get_audioformat_uac3()
In snd_usb_get_audioformat_uac3(), the length value returned from snd_usb_ctl_msg() is used directly for memory allocation without validation. This length is controlled by the USB device.
The allocated buffer is cast to a uac3_cluster_header_descriptor and its fields are accessed without verifying that the buffer is large enough. If the device returns a smaller than expected length, this leads to an out-of-bounds read.
Add a length check to ensure the buffer is large enough for uac3_cluster_header_descriptor.
From the CVE record · Linux
The Linux kernel’s ALSA USB audio code does not validate a USB device-provided length before reading a UAC3 descriptor. A USB device that returns a shorter-than-expected length can trigger an out-of-bounds read; the input does not specify authentication requirements.
Engineers running the Linux kernel with ALSA USB audio support should check their versions; affected versions are not specified.