ALSA: line6: Sync the pending work cancel at disconnection
authorTakashi Iwai <tiwai@suse.de>
Fri, 10 Jul 2020 13:59:59 +0000 (15:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:16 +0000 (09:34 +0200)
commitb22a641e98b53a3e11473eac2bda8c10cac74257
tree018a511c3eb06d28cd72aa7ee92b7116d663a765
parent763f7da87185e69c6bd8a1ada71905fab9545f64
ALSA: line6: Sync the pending work cancel at disconnection

commit 68359a1ad8447c99732ebeab8c169bfed543667a upstream.

Recently syzkaller reported a UAF in LINE6 driver, and it's likely
because we call cancel_delayed_work() at the disconnect callback
instead of cancel_delayed_work_sync().  Let's use the correct one
instead.

Reported-by: syzbot+145012a46658ac00fc9e@syzkaller.appspotmail.com
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/s5hlfjr4gio.wl-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/line6/driver.c