]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: usb-audio: Add sanity checks to FE parser
authorTakashi Iwai <tiwai@suse.de>
Tue, 21 Nov 2017 15:55:51 +0000 (16:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:35:51 +0000 (08:35 +0000)
commit7940c950ca9460311cd1804f86655b1791ab128e
tree264d5ac5354519188b1a80882dce4f751ba51983
parent9b3f0217e0b7272204c9efc07bec1a5e4e1d6502
ALSA: usb-audio: Add sanity checks to FE parser

commit d937cd6790a2bef2d07b500487646bd794c039bb upstream.

When the usb-audio descriptor contains the malformed feature unit
description with a too short length, the driver may access
out-of-bounds.  Add a sanity check of the header size at the beginning
of parse_audio_feature_unit().

Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0")
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/mixer.c