linux-imx/sound/usb/line6
Takashi Iwai 535df7f896 ALSA: line6: Fix racy access to midibuf
commit 15b7a03205 upstream.

There can be concurrent accesses to line6 midibuf from both the URB
completion callback and the rawmidi API access.  This could be a cause
of KMSAN warning triggered by syzkaller below (so put as reported-by
here).

This patch protects the midibuf call of the former code path with a
spinlock for avoiding the possible races.

Reported-by: syzbot+78eccfb8b3c9a85fc6c5@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/00000000000000949c061df288c5@google.com
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20240805130129.10872-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-14 13:58:53 +02:00
..
capture.c
capture.h
driver.c ALSA: line6: Fix racy access to midibuf 2024-08-14 13:58:53 +02:00
driver.h ALSA: line6: remove line6_set_raw declaration 2022-09-09 09:09:20 +02:00
Kconfig
Makefile
midi.c ALSA: line6: fix stack overflow in line6_midi_transmit 2022-12-26 09:07:49 +01:00
midi.h
midibuf.c ALSA: line6: correct midi status byte when receiving data from podxt 2022-12-26 09:06:19 +01:00
midibuf.h ALSA: line6: correct midi status byte when receiving data from podxt 2022-12-26 09:06:19 +01:00
pcm.c sound: usb: remove third argument of usb_maxpacket() 2022-04-23 10:33:53 +02:00
pcm.h
playback.c
playback.h
pod.c ALSA: line6: correct midi status byte when receiving data from podxt 2022-12-26 09:06:19 +01:00
podhd.c ALSA: line6: Replace sprintf() with sysfs_emit() 2022-08-02 16:03:49 +02:00
toneport.c ALSA: line6: fix control and interrupt message timeouts 2021-10-26 08:12:14 +02:00
variax.c