All of
 help / color / mirror / Atom feed
From: Johan Hovold <>
To: Greg Kroah-Hartman <>
Cc:, Johan Hovold <>
Subject: [PATCH 2/3] USB: usb-skeleton: fix use-after-free after driver unbind
Date: Wed,  9 Oct 2019 19:09:43 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

The driver failed to stop its read URB on disconnect, something which
could lead to a use-after-free in the completion handler after driver
unbind in case the character device has been closed.

Fixes: e7389cc9a7ff ("USB: skel_read really sucks royally")
Signed-off-by: Johan Hovold <>
 drivers/usb/usb-skeleton.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index c2843fcfa52d..be311787403e 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -575,6 +575,7 @@ static void skel_disconnect(struct usb_interface *interface)
 	dev->disconnected = 1;
+	usb_kill_urb(dev->bulk_in_urb);
 	/* decrement our usage count */

  parent reply	other threads:[~2019-10-09 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 17:09 [PATCH 0/3] USB: usb-skeleton: regression fix Johan Hovold
2019-10-09 17:09 ` [PATCH 1/3] USB: usb-skeleton: fix NULL-deref on disconnect Johan Hovold
2019-10-09 17:09 ` Johan Hovold [this message]
2019-10-09 17:09 ` [PATCH 3/3] USB: usb-skeleton: drop redundant in-urb check Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: [PATCH 2/3] USB: usb-skeleton: fix use-after-free after driver unbind' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.