]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Validate MS endpoint descriptors
authorTakashi Iwai <tiwai@suse.de>
Mon, 10 May 2021 15:06:59 +0000 (17:06 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 10 May 2021 15:08:38 +0000 (17:08 +0200)
commitace1028eea89a6f4d36a203e9c93095f745f858e
treede7946aafb61ac751a531065920c599003027f27
parente8a5531320386059c015f1c2811d32bad217dfd4
ALSA: usb-audio: Validate MS endpoint descriptors

snd_usbmidi_get_ms_info() may access beyond the border when a
malformed descriptor is passed.  This patch adds the sanity checks of
the given MS endpoint descriptors, and skips invalid ones.

Reported-by: syzbot+6bb23a5d5548b93c94aa@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210510150659.17710-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/midi.c