diff options
author | Takashi Iwai <tiwai@suse.de> | 2016-02-08 17:36:25 +0100 |
---|---|---|
committer | Adrian Salido <salidoa@google.com> | 2017-09-21 11:51:38 -0700 |
commit | 964a54ba0c7787449bce05f78c06712f6f424e5e (patch) | |
tree | 1d33502b4115359bf50c193125a398f58871b103 | |
parent | e6c608df16a6ea8503560924ef51984e0885fc0a (diff) | |
download | tegra-964a54ba0c7787449bce05f78c06712f6f424e5e.tar.gz |
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.
Change-Id: I2da6e348cf3b21af377cec3a5b7829861e088940
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>
Bug: 37240993
-rw-r--r-- | sound/core/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index d1daeb867cf6..96ffc1b4e16e 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -416,7 +416,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event) spin_lock_irqsave(&timer->lock, flags); list_for_each_entry(ts, &ti->slave_active_head, active_list) if (ts->ccallback) - ts->ccallback(ti, event + 100, &tstamp, resolution); + ts->ccallback(ts, event + 100, &tstamp, resolution); spin_unlock_irqrestore(&timer->lock, flags); } |