]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit()
authorTakashi Iwai <tiwai@suse.de>
Wed, 19 Dec 2018 11:36:27 +0000 (12:36 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 7 Jan 2019 09:46:26 +0000 (10:46 +0100)
commitff66d92197fdc8a8f310422c5934b73a73f72c81
treeb3d38fbd367555c5a905dc37954a4af73dd74bf6
parentd6952d4b95d3a6897fcea7446c97f59f8d24556b
ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit()

The parser for the processing unit reads bNrInPins field before the
bLength sanity check, which may lead to an out-of-bound access when a
malformed descriptor is given.  Fix it by assignment after the bLength
check.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer.c