]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: usb-audio: Add sanity checks for endpoint accesses
authorTakashi Iwai <tiwai@suse.de>
Tue, 15 Mar 2016 14:20:58 +0000 (15:20 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:29 +0000 (15:46 -0700)
commit96fd873ec7a37c6b5b602f50bcf5d4c2172d2e0f
treea6a0247d62be8eecca34f1b02b7515dad6aa9403
parent9422f92e6837418768fd9efcf92b2e269790d0cf
ALSA: usb-audio: Add sanity checks for endpoint accesses

Orabug: 23331117

[ Upstream commit 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a ]

Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor.  Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity of iface and
altsetting index is checked as well.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=971125
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 4fa1657957f668fcc9606268df01bc0f3e4f1379)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
sound/usb/clock.c
sound/usb/endpoint.c
sound/usb/mixer_quirks.c
sound/usb/pcm.c