android_kernel_samsung_a7y1.../sound/usb/line6
Takashi Iwai c72aae47d6 ALSA: line6: Fix endless MIDI read loop
commit d683469b3c93d7e2afd39e6e1970f24700eb7a68 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-07 14:14:11 +02:00
..
capture.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
capture.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
driver.c ALSA: line6: Fix endless MIDI read loop 2020-04-07 14:14:11 +02:00
driver.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
midi.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
midi.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
midibuf.c ALSA: line6: Fix endless MIDI read loop 2020-04-07 14:14:11 +02:00
midibuf.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcm.c ALSA: line6: Fix memory leak at line6_init_pcm() error path 2020-04-07 13:36:26 +02:00
pcm.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
playback.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
playback.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pod.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
podhd.c ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1 2020-04-06 20:16:45 +02:00
toneport.c ALSA: line6: use dynamic buffers 2020-04-06 16:41:48 +02:00
variax.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30