android_kernel_google_msm/sound/usb
Vladis Dronov e74a14ad5f ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and
create_uaxx_quirk() functions allocate the audioformat object by themselves
and free it upon error before returning. However, once the object is linked
to a stream, it's freed again in snd_usb_audio_pcm_free(), thus it'll be
double-freed, eventually resulting in a memory corruption.

This patch fixes these failures in the error paths by unlinking the audioformat
object before freeing it.

Based on a patch by Takashi Iwai <tiwai@suse.de>

[Note for stable backports:
 this patch requires the commit 902eb7fd1e4a ('ALSA: usb-audio: Minor
 code cleanup in create_fixed_stream_quirk()')]

Change-Id: I129dc4f3b0ae4cb6f790c16d24dd768c9ee06822
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1283358
Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Cc: <stable@vger.kernel.org> # see the note above
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-11 13:37:28 +11:00
..
6fire ALSA: snd-usb-6fire: add analog input volume control 2012-02-22 15:51:26 +01:00
caiaq ALSA: snd-usb-caiaq: Fix the return of XRUN 2012-02-22 08:34:58 +01:00
misc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound 2012-01-12 08:00:30 -08:00
usx2y ALSA: usx2y: Fix typo in usbusx2yaudio.c and usx2yhwdeppcm.c 2012-02-15 14:56:11 +01:00
card.c msm: usbaudio: Add support for USB headset detection 2013-02-25 11:41:08 -08:00
card.h ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk() 2012-02-15 14:58:15 +01:00
clock.c
clock.h
debug.h
endpoint.c ALSA: usb-audio - Avoid flood of frame-active debug messages 2012-01-09 11:40:46 +01:00
endpoint.h
format.c ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk() 2012-02-15 14:58:15 +01:00
format.h
helper.c
helper.h
Kconfig ALSA: snd-usb-6fire: Select missing SND_VMASTER option in Kconfig 2012-02-25 11:07:19 +01:00
Makefile
midi.c ALSA: usb-audio: avoid freeing umidi object twice 2016-10-29 23:12:35 +08:00
midi.h
mixer.c ALSA: snd_usb_audio: add Logitech HD Webcam c510 to quirk-384 2011-11-09 12:22:38 +01:00
mixer.h
mixer_maps.c
mixer_quirks.c
mixer_quirks.h
pcm.c ALSA: usb-audio - Fix build error by consitification of rate list 2012-03-15 16:14:38 +01:00
pcm.h
power.h
proc.c
proc.h
quirks-table.h ALSA: usb-audio: add Edirol UM-3G support 2012-02-08 09:46:34 +01:00
quirks.c ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call 2016-11-11 13:37:28 +11:00
quirks.h
stream.c ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call 2016-11-11 13:37:28 +11:00
stream.h
usbaudio.h