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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:20:52 +0000 (10:20 +0200)
commited2d2a172c5f4ab32bdf92e4e5a9f033a75f7b6b
treef9a71ae1a59f1ab3427eae6c949806f40ffcdbe6
parent0cb49ca2dc8bf9ee50d1b2ceb42a86bb6c8dc15d
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
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/seq/seq_clientmgr.c
sound/core/seq/seq_fifo.c
sound/core/seq/seq_fifo.h