ALSA: timer: Fix wrong instance passed to slave callbacks
authorTakashi Iwai <tiwai@suse.de>
Mon, 8 Feb 2016 16:36:25 +0000 (17:36 +0100)
committerDanny Wood <danwood76@gmail.com>
Fri, 11 Jan 2019 07:53:48 +0000 (07:53 +0000)
commitbf4b9944dc8c3b54afdc7c6c9c6c833eebe110f3
tree00e4995b97e652c821677a8bdf4af208d5020f95
parent162be921fbbf8074881c4a33d294d6382a200447
ALSA: timer: Fix wrong instance passed to slave callbacks

commit 117159f0b9d392fb433a7871426fad50317f06f7 upstream.

In snd_timer_notify1(), the wrong timer instance was passed for slave
ccallback function.  This leads to the access to the wrong data when
an incompatible master is handled (e.g. the master is the sequencer
timer and the slave is a user timer), as spotted by syzkaller fuzzer.

This patch fixes that wrong assignment.

BugLink: http://lkml.kernel.org/r/CACT4Y+Y_Bm+7epAb=8Wi=AaWd+DYS7qawX52qxdCfOfY49vozQ@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/timer.c