]> 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)
commit951ab56158c5c850dc006b33d8feee5051895032
treeb3d38fbd367555c5a905dc37954a4af73dd74bf6
parentf9bb4b753eb00c02014e4467a28609f4f6ac7f88
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