CVE-2022-48701: ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface()
There may be a bad USB audio device with a USB ID of (0x04fa, 0x4201) and the number of it's interfaces less than 4, an out-of-bounds read bug occurs when parsing the interface descriptor for this device.
Fix this by checking the number of interfaces.
The Linux kernel CVE team has assigned CVE-2022-48701 to this issue.
Affected and fixed versions
===========================
Fixed in 4.9.328 with commit b970518014f2 Fixed in 4.14.293 with commit 91904870370f Fixed in 4.19.258 with commit 2a308e415d24 Fixed in 5.4.213 with commit 0492798bf8df Fixed in 5.10.143 with commit 6123bec8480d Fixed in 5.15.68 with commit 98e8e67395cc Fixed in 5.19.9 with commit 8293e61bbf90 Fixed in 6.0 with commit e53f47f6c1a5
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-48701
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
sound/usb/stream.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/b970518014f2f0f6c493fb86c1e092b936899061 https://git.kernel.org/stable/c/91904870370fd986c29719846ed76d559de43251 https://git.kernel.org/stable/c/2a308e415d247a23d4d64c964c02e782eede2936 https://git.kernel.org/stable/c/0492798bf8dfcc09c9337a1ba065da1d1ca68712 https://git.kernel.org/stable/c/6123bec8480d23369e2ee0b2208611619f269faf https://git.kernel.org/stable/c/98e8e67395cc6d0cdf3a771f86ea42d0ee6e59dd https://git.kernel.org/stable/c/8293e61bbf908b18ff9935238d4fc2ad359e3fe0 https://git.kernel.org/stable/c/e53f47f6c1a56d2af728909f1cb894da6b43d9bf