]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: seq: Fix racy access for queue timer in proc read
authorTakashi Iwai <tiwai@suse.de>
Wed, 15 Jan 2020 20:37:33 +0000 (21:37 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 15 Jan 2020 20:38:18 +0000 (21:38 +0100)
commit4c589ec3facea9a4cd1d934186aed31f341e81a6
tree5d14b22d1dc22cee63d066961c1bf30dd6c8ee85
parent42e17de1d616733cb5820945b4c26659989f0542
ALSA: seq: Fix racy access for queue timer in proc read

snd_seq_info_timer_read() reads the information of the timer assigned
for each queue, but it's done in a racy way which may lead to UAF as
spotted by syzkaller.

This patch applies the missing q->timer_mutex lock while accessing the
timer object as well as a slight code change to adapt the standard
coding style.

Reported-by: syzbot+2b2ef983f973e5c40943@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200115203733.26530-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_timer.c