]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: seq: Fix race at timer setup and close
authorTakashi Iwai <tiwai@suse.de>
Tue, 12 Jan 2016 14:36:27 +0000 (15:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 May 2017 12:18:44 +0000 (14:18 +0200)
commit6d4025862a080579362994eeb0095eb78dd801f2
tree80555367cb4757c50c52dfbd6b8a12093f986f90
parentf5efbbc2bd0a4f30c4f312f9d867ff7ef18df2f9
ALSA: seq: Fix race at timer setup and close

commit 3567eb6af614dac436c4b16a8d426f9faed639b3 upstream.

ALSA sequencer code has an open race between the timer setup ioctl and
the close of the client.  This was triggered by syzkaller fuzzer, and
a use-after-free was caught there as a result.

This patch papers over it by adding a proper queue->timer_mutex lock
around the timer-related calls in the relevant code path.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/seq/seq_queue.c