]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix potential out-of-bounce access in MIDI EP parser
authorTakashi Iwai <tiwai@suse.de>
Tue, 11 May 2021 09:05:00 +0000 (11:05 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 11 May 2021 09:10:37 +0000 (11:10 +0200)
commitbbbacf2b457556726f3ef3d7856fb5437e218a9e
treef57cc299de657a8e6e23a1c5b316d30fbbd59f07
parentace1028eea89a6f4d36a203e9c93095f745f858e
ALSA: usb-audio: Fix potential out-of-bounce access in MIDI EP parser

The recently introduced MIDI endpoint parser code has an access to the
field without the size validation, hence it might lead to
out-of-bounce access.  Add the sanity checks for the descriptor
sizes.

Fixes: fd8fbd2db1a2 ("ALSA: usb-audio: generate midi streaming substream names from jack names")
Link: https://lore.kernel.org/r/20210511090500.2637-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/midi.c