]> git.itanic.dy.fi Git - linux-stable/commit
ALSA: seq: Fix potential concurrent access to the deleted pool
authorTakashi Iwai <tiwai@suse.de>
Sun, 25 Aug 2019 07:21:44 +0000 (09:21 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 22 Nov 2019 15:57:20 +0000 (15:57 +0000)
commite0073a55637280bf2bce71650283380447b50f6e
tree11163143d422ba69c23bb80f448b1c045d596aa8
parentf9a945af384351df9e8fa0cdd678c23701b0290e
ALSA: seq: Fix potential concurrent access to the deleted pool

commit 75545304eba6a3d282f923b96a466dc25a81e359 upstream.

The input pool of a client might be deleted via the resize ioctl, the
the access to it should be covered by the proper locks.  Currently the
only missing place is the call in snd_seq_ioctl_get_client_pool(), and
this patch papers over it.

Reported-by: syzbot+4a75454b9ca2777f35c7@syzkaller.appspotmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/core/seq/seq_clientmgr.c
sound/core/seq/seq_fifo.c
sound/core/seq/seq_fifo.h