WSL2-Linux-Kernel/sound/usb/line6
Takashi Iwai a54da4b787 ALSA: line6: Fix racy access to midibuf
commit 15b7a03205b31bc5623378c190d22b7ff60026f1 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-19 05:45:43 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
capture.c ALSA: line6: Perform sanity check for each URB creation 2020-07-10 16:29:18 +02:00
capture.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
driver.c ALSA: line6: Fix racy access to midibuf 2024-08-19 05:45:43 +02:00
driver.h ALSA: line6: fix control and interrupt message timeouts 2021-11-18 19:15:54 +01:00
midi.c ALSA: line6: fix stack overflow in line6_midi_transmit 2023-01-12 11:58:47 +01:00
midi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
midibuf.c ALSA: line6: correct midi status byte when receiving data from podxt 2023-01-12 11:58:47 +01:00
midibuf.h ALSA: line6: correct midi status byte when receiving data from podxt 2023-01-12 11:58:47 +01:00
pcm.c ALSA: line6: Use managed buffer allocation 2019-12-11 07:25:23 +01:00
pcm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
playback.c ALSA: line6: Perform sanity check for each URB creation 2020-07-10 16:29:18 +02:00
playback.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
pod.c ALSA: line6: correct midi status byte when receiving data from podxt 2023-01-12 11:58:47 +01:00
podhd.c ALSA: line6: fix control and interrupt message timeouts 2021-11-18 19:15:54 +01:00
toneport.c ALSA: line6: fix control and interrupt message timeouts 2021-11-18 19:15:54 +01:00
variax.c ALSA: line6: Fix racy initialization of LINE6 MIDI 2021-05-19 16:25:57 +02:00