linux-stable/sound
Takashi Iwai f784beb75c ALSA: timer: Fix link corruption due to double start or stop
Although ALSA timer code got hardening for races, it still causes
use-after-free error.  This is however rather a corrupted linked list,
not actually the concurrent accesses.  Namely, when timer start is
triggered twice, list_add_tail() is called twice, too.  This ends
up with the link corruption and triggers KASAN error.

The simplest fix would be replacing list_add_tail() with
list_move_tail(), but fundamentally it's the problem that we don't
check the double start/stop correctly.  So, the right fix here is to
add the proper checks to snd_timer_start() and snd_timer_stop() (and
their variants).

BugLink: http://lkml.kernel.org/r/CACT4Y+ZyPRoMQjmawbvmCEDrkBD2BQuH7R09=eOkf5ESK8kJAw@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-01 12:23:29 +01:00
..
aoa ALSA: aoa-soundbus: Switch to dev_pm_ops 2015-08-05 16:47:47 +02:00
arm ASoC: pxa: pxa-pcm-lib: switch over to snd-soc-dmaengine-pcm 2015-09-30 23:21:16 +01:00
atmel
core ALSA: timer: Fix link corruption due to double start or stop 2016-02-01 12:23:29 +01:00
drivers ALSA: dummy: Disable switching timer backend via sysfs 2016-01-28 08:13:54 +01:00
firewire ALSA: bebob: Use a signed return type for get_formation_index 2016-01-26 11:38:53 +01:00
hda ALSA: hda - Degrade i915 binding failure message 2016-01-20 15:00:26 +01:00
i2c ALSA: i2c: constify snd_i2c_ops structures 2015-11-30 11:40:08 +01:00
isa ALSA: Add missing dependency on CONFIG_SND_TIMER 2016-01-27 07:10:38 +01:00
mips ALSA: mips: let SND_SGI_O2 select SND_PCM 2015-06-15 13:21:58 +02:00
oss sound/oss: remove VIRT_TO_BUS dependency 2015-12-09 14:40:51 +01:00
parisc
pci ALSA: emu10k1: correctly handling failed thread creation 2016-01-29 17:30:25 +01:00
pcmcia
ppc ALSA: ppc: Add missing inclusion of linux/module.h 2015-08-25 14:13:36 +02:00
sh
soc ARM: SoC multiplatform code changes for v4.5 2016-01-20 18:03:56 -08:00
sparc ALSA: Add missing dependency on CONFIG_SND_TIMER 2016-01-27 07:10:38 +01:00
spi ALSA: at73c213: manage SSC clock 2016-01-20 09:59:27 +01:00
synth ALSA: emux: constify nrpn_conv_table structures 2016-01-06 10:19:49 +01:00
usb ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000 2016-01-29 17:25:39 +01:00
ac97_bus.c ASoC: Updates for v4.3 2015-08-31 16:25:22 +02:00
Kconfig
last.c
Makefile
sound_core.c sound: fix check for error condition of register_chrdev() 2015-11-07 11:14:30 +01:00
sound_firmware.c