kernel_samsung_a53x/sound/usb/line6
Takashi Iwai 3c66b91ddb 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-11-23 23:20:27 +01:00
..
capture.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
capture.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver.c ALSA: line6: Fix racy access to midibuf 2024-11-23 23:20:27 +01:00
driver.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
midi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
midi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
midibuf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
midibuf.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
playback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
playback.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pod.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
podhd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
toneport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
variax.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00