]> git.baikalelectronics.ru Git - kernel.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)
committerTakashi Iwai <tiwai@suse.de>
Tue, 12 Jan 2016 16:50:41 +0000 (17:50 +0100)
commit1f0bfdbcf5da20b3e47bb3f5af0e131ec27f1573
tree4f2b3091ad80d3b49bd54b9951fa8743e2f6cfee
parentc888e552076d8dc18339be2694ec54155c5ccf3e
ALSA: seq: Fix race at timer setup and close

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_queue.c