OSDN Git Service

ALSA: aloop: Add missing cable lock to ctl API callbacks
authorTakashi Iwai <tiwai@suse.de>
Mon, 30 Apr 2018 08:06:48 +0000 (10:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 May 2018 07:50:20 +0000 (09:50 +0200)
commitb6a49cc35cf52ac3835a22a0bbcff59be6d181bd
treea63f4cdd4f13b94a39012b31bdd9e494f3b7c9d5
parent68f4bc3ab8f13631ad6c144f13c22665382f0387
ALSA: aloop: Add missing cable lock to ctl API callbacks

commit 76b3421b39bd610546931fc923edcf90c18fa395 upstream.

Some control API callbacks in aloop driver are too lazy to take the
loopback->cable_lock and it results in possible races of cable access
while it's being freed.  It eventually lead to a UAF, as reported by
fuzzer recently.

This patch covers such control API callbacks and add the proper mutex
locks.

Reported-by: DaeRyong Jeong <threeearcat@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/drivers/aloop.c