]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 12:52:22 +0000 (06:52 -0600)
commitfb8f22b7a5aeafd8ca4e480e69b7fc830787757c
tree3c8138494abdb6ff4e0fa59250ab6b3963f75e2b
parent190244b9de927ef0c855e38952be4e2f5e058da2
ALSA: usb-audio: Add sanity checks for endpoint accesses

BugLink: http://bugs.launchpad.net/bugs/1572722
commit 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a upstream.

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
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
sound/usb/clock.c
sound/usb/endpoint.c
sound/usb/mixer_quirks.c
sound/usb/pcm.c