Skip to content

Commit

Permalink
ALSA: line6: Sync the pending work cancel at disconnection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jul 10, 2020
1 parent 6e8a914 commit 68359a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/line6/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ void line6_disconnect(struct usb_interface *interface)
if (WARN_ON(usbdev != line6->usbdev))
return;

cancel_delayed_work(&line6->startup_work);
cancel_delayed_work_sync(&line6->startup_work);

if (line6->urb_listen != NULL)
line6_stop_listen(line6);
Expand Down

0 comments on commit 68359a1

Please sign in to comment.