linux-yocto/sound
Jeongjun Park 647d6b8d22 ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free
commit 9f2c0ac1423d5f267e7f1d1940780fc764b0fee3 upstream.

The previous commit 0718a78f6a ("ALSA: usb-audio: Kill timer properly at
removal") patched a UAF issue caused by the error timer.

However, because the error timer kill added in this patch occurs after the
endpoint delete, a race condition to UAF still occurs, albeit rarely.

Additionally, since kill-cleanup for urb is also missing, freed memory can
be accessed in interrupt context related to urb, which can cause UAF.

Therefore, to prevent this, error timer and urb must be killed before
freeing the heap memory.

Cc: <stable@vger.kernel.org>
Reported-by: syzbot+f02665daa2abeef4a947@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=f02665daa2abeef4a947
Fixes: 0718a78f6a ("ALSA: usb-audio: Kill timer properly at removal")
Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-10-12 12:57:18 +02:00
..
ac97
aoa ALSA: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-09-20 17:44:52 +02:00
arm
atmel
core ALSA: timer: fix ida_free call while not allocated 2025-08-28 16:31:15 +02:00
drivers ALSA: aloop: Allow using global timers 2024-08-18 09:55:54 +02:00
firewire ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported 2025-09-25 11:13:41 +02:00
hda ALSA: core: fix up bus match const issues. 2025-06-19 15:31:33 +02:00
i2c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
isa ALSA: ad1816a: Fix potential NULL pointer deref in snd_card_ad1816a_pnp() 2025-07-17 18:37:09 +02:00
mips
oss [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
parisc
pci ALSA: hda/realtek: Add support for ASUS NUC using CS35L41 HDA 2025-10-02 13:44:06 +02:00
pcmcia ALSA: vxpocket: Fix a typo at conversion to dev_*() 2024-08-08 20:23:41 +02:00
ppc ALSA: ppc: Use standard print API 2024-08-08 07:49:47 +02:00
sh ALSA: sh: SND_AICA should depend on SH_DMA_API 2025-05-22 14:29:41 +02:00
soc ASoC: rt5682s: Adjust SAR ADC button mode to fix noise issue 2025-10-12 12:57:16 +02:00
sparc ALSA: sparc: Fix a typo at dev_*() conversion 2024-08-09 09:39:48 +02:00
spi
synth ALSA: emux: Use standard print API 2024-08-08 07:49:46 +02:00
usb ALSA: usb-audio: fix race condition to UAF in snd_usbmidi_free 2025-10-12 12:57:18 +02:00
virtio sound/virtio: Fix cancel_sync warnings on uninitialized work_structs 2025-05-02 07:59:17 +02:00
x86 ALSA: intel_hdmi: Fix off-by-one error in __hdmi_lpe_audio_probe() 2025-08-15 12:14:12 +02:00
xen
ac97_bus.c
Kconfig sound: Make CONFIG_SND depend on INDIRECT_IOMEM instead of UML 2024-10-10 16:11:18 +02:00
last.c
Makefile
sound_core.c