Skip to content
Commit 3e96d728 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: usb-audio: Always check descriptor sizes in parser code



There are a few places where we access the data without checking the
actual object size from the USB audio descriptor.  This may result in
OOB access, as recently reported.

This patch addresses these missing checks.  Most of added codes are
simple bLength checks in the caller side.  For the input and output
terminal parsers, we put the length check in the parser functions.
For the input terminal, a new argument is added to distinguish between
UAC1 and the rest, as they treat different objects.

Reported-by: default avatarMathias Payer <mathias.payer@nebelwelt.net>
Reported-by: default avatarHui Peng <benquike@163.com>
Tested-by: default avatarHui Peng <benquike@163.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 0bfe5e43
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment