linux/sound
Hui Peng 5f8cf71258 ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c
If a USB sound card reports 0 interfaces, an error condition is triggered
and the function usb_audio_probe errors out. In the error path, there was a
use-after-free vulnerability where the memory object of the card was first
freed, followed by a decrement of the number of active chips. Moving the
decrement above the atomic_dec fixes the UAF.

[ The original problem was introduced in 3.1 kernel, while it was
  developed in a different form.  The Fixes tag below indicates the
  original commit but it doesn't mean that the patch is applicable
  cleanly. -- tiwai ]

Fixes: 362e4e49ab ("ALSA: usb-audio - clear chip->probing on error exit")
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Signed-off-by: Hui Peng <benquike@gmail.com>
Signed-off-by: Mathias Payer <mathias.payer@nebelwelt.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-12-03 16:09:38 +01:00
..
ac97 ALSA: ac97: fix unbalanced pm_runtime_enable 2018-08-19 18:37:04 +02:00
aoa ALSA: aoa: Convert to using %pOFn instead of device_node.name 2018-09-03 23:41:57 +02:00
arm ASoC: pxa: switch to new ac97 bus support 2018-09-10 18:47:58 +01:00
atmel
core ALSA: pcm: Fix starvation on down_write_nonblock() 2018-11-29 08:15:19 +01:00
drivers ALSA: opl3: Mark expected switch fall-through 2018-08-08 21:40:14 +02:00
firewire ALSA: firewire-lib: fix insufficient PCM rule for period/buffer size 2018-10-30 12:22:12 +01:00
hda sound updates for 4.20 2018-10-25 09:00:15 -07:00
i2c ALSA: i2c/cs8427: Fix int to char conversion 2018-10-18 15:44:08 +02:00
isa ALSA: wss: Fix invalid snd_free_pages() at error path 2018-11-24 19:55:59 +01:00
mips ALSA: mips: Cleanup indirect PCM helper usages 2018-09-04 12:13:46 +02:00
oss treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
parisc
pci ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570 2018-12-03 10:44:15 +01:00
pcmcia Merge branch 'for-linus' into topic/virmidi 2018-07-29 22:39:29 +02:00
ppc powerpc/ps3: Set driver coherent_dma_mask 2018-07-20 12:50:37 +10:00
sh
soc ASoC: Fixes for v4.20 2018-11-27 16:06:42 +01:00
sparc ALSA: sparc: Fix invalid snd_free_pages() at error path 2018-11-24 19:56:15 +01:00
spi
synth ALSA: synth: Remove empty init and exit 2018-08-03 16:11:53 +02:00
usb ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c 2018-12-03 16:09:38 +01:00
x86 ALSA: intel_hdmi: Use the new non-cached allocation 2018-08-28 13:56:49 +02:00
xen ALSA: xen-front: Refine indentations and constify snd_pcm_ops 2018-09-20 09:14:52 +02:00
ac97_bus.c
Kconfig ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver 2018-05-16 12:58:36 +02:00
last.c
Makefile ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver 2018-05-16 12:58:36 +02:00
sound_core.c sound: Use octal not symbolic permissions 2018-05-28 11:27:20 +02:00