]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: 6fire: Release resources at card release
authorTakashi Iwai <tiwai@suse.de>
Wed, 13 Nov 2024 11:10:39 +0000 (12:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:53:26 +0000 (13:53 +0100)
commit0df7f4b5cc10f5adf98be0845372e9eef7bb5b09
tree8fcef7f96f6a7217110116ad0e9626a20b303059
parentdd0de8cb708951cebf727aa045e8242ba651bb52
ALSA: 6fire: Release resources at card release

[ Upstream commit a0810c3d6dd2d29a9b92604d682eacd2902ce947 ]

The current 6fire code tries to release the resources right after the
call of usb6fire_chip_abort().  But at this moment, the card object
might be still in use (as we're calling snd_card_free_when_closed()).

For avoid potential UAFs, move the release of resources to the card's
private_free instead of the manual call of usb6fire_chip_destroy() at
the USB disconnect callback.

Fixes: c6d43ba816d1 ("ALSA: usb/6fire - Driver for TerraTec DMX 6Fire USB")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-6-tiwai@suse.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/6fire/chip.c