linux-stable/sound/pci/ymfpci
Takashi Iwai c02c4e76cc ALSA: ymfpci: Fix the missing snd_card_free() call at probe error
commit 1d0eb6143c upstream.

Like a few other drivers, YMFPCI driver needs to clean up with
snd_card_free() call at an error path of the probe; otherwise the
other devres resources are released before the card and it results in
the UAF.

This patch uses the helper for handling the probe error gracefully.

Fixes: f33fc15767 ("ALSA: ymfpci: Create card with device-managed snd_devm_card_new()")
Cc: <stable@vger.kernel.org>
Reported-and-tested-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Closes: https://lore.kernel.org/r/20230823135846.1812-1-takashi.yano@nifty.ne.jp
Link: https://lore.kernel.org/r/20230823161625.5807-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 14:52:36 +02:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ymfpci.c ALSA: ymfpci: Fix the missing snd_card_free() call at probe error 2023-08-30 14:52:36 +02:00
ymfpci.h ALSA: ymfpci: Use u16 consistently for old_legacy_ctrl 2023-03-29 08:28:47 +02:00
ymfpci_main.c ALSA: ymfpci: Fix kctl->id initialization 2023-06-06 14:30:27 +02:00