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)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 27 Feb 2016 14:28:48 +0000 (14:28 +0000)
commit20e86609a41d8de24096eacb5a320008631aff0f
treee31bc8e5d6e21489a5103c13baefab3a2fa6d332
parent98aa5568b6f785499a6970f5b783bf4f2256ba6e
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: Ben Hutchings <ben@decadent.org.uk>
sound/core/timer.c