WSL2-Linux-Kernel/sound/usb/line6
Takashi Iwai d683469b3c ALSA: line6: Fix endless MIDI read loop
The MIDI input event parser of the LINE6 driver may enter into an
endless loop when the unexpected data sequence is given, as it tries
to continue the secondary bytes without termination.  Also, when the
input data is too short, the parser returns a negative error, while
the caller doesn't handle it properly.  This would lead to the
unexpected behavior as well.

This patch addresses those issues by checking the return value
correctly and handling the one-byte event in the parser properly.

The bug was reported by syzkaller.

Reported-by: syzbot+cce32521ee0a824c21f7@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/000000000000033087059f8f8fa3@google.com
Link: https://lore.kernel.org/r/20200309095922.30269-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2020-03-09 11:00:45 +01:00
..
Kconfig
Makefile
capture.c ALSA: usb: Drop superfluous ioctl PCM ops 2019-12-11 07:25:34 +01:00
capture.h
driver.c ALSA: line6: Fix endless MIDI read loop 2020-03-09 11:00:45 +01:00
driver.h
midi.c
midi.h
midibuf.c ALSA: line6: Fix endless MIDI read loop 2020-03-09 11:00:45 +01:00
midibuf.h
pcm.c ALSA: line6: Use managed buffer allocation 2019-12-11 07:25:23 +01:00
pcm.h
playback.c ALSA: usb: Drop superfluous ioctl PCM ops 2019-12-11 07:25:34 +01:00
playback.h
pod.c ALSA: line6: Constify snd_ratden definitions 2020-01-03 09:24:40 +01:00
podhd.c ALSA: line6: Constify snd_ratden definitions 2020-01-03 09:24:40 +01:00
toneport.c ALSA: line6: Constify snd_ratden definitions 2020-01-03 09:24:40 +01:00
variax.c