Commit 68359a1a authored by Takashi Iwai's avatar Takashi Iwai

ALSA: line6: Sync the pending work cancel at disconnection

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: default avatarAlan Stern <stern@rowland.harvard.edu>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/s5hlfjr4gio.wl-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6e8a914a
...@@ -840,7 +840,7 @@ void line6_disconnect(struct usb_interface *interface) ...@@ -840,7 +840,7 @@ void line6_disconnect(struct usb_interface *interface)
if (WARN_ON(usbdev != line6->usbdev)) if (WARN_ON(usbdev != line6->usbdev))
return; return;
cancel_delayed_work(&line6->startup_work); cancel_delayed_work_sync(&line6->startup_work);
if (line6->urb_listen != NULL) if (line6->urb_listen != NULL)
line6_stop_listen(line6); line6_stop_listen(line6);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment