* Patch "usb: misc: lvs: fix race condition in disconnect handling" has been added to the 4.9-stable tree
@ 2018-03-18 16:05 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-18 16:05 UTC (permalink / raw)
To: oneukum, alexander.levin, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
usb: misc: lvs: fix race condition in disconnect handling
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-misc-lvs-fix-race-condition-in-disconnect-handling.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Oliver Neukum <oneukum@suse.com>
Date: Tue, 14 Mar 2017 12:05:07 +0100
Subject: usb: misc: lvs: fix race condition in disconnect handling
From: Oliver Neukum <oneukum@suse.com>
[ Upstream commit c4ba329cabca7c839ab48fb58b5bcc2582951a48 ]
There is a small window during which the an URB may
remain active after disconnect has returned. If in that case
already freed memory may be accessed and executed.
The fix is to poison the URB befotre the work is flushed.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/misc/lvstest.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/usb/misc/lvstest.c
+++ b/drivers/usb/misc/lvstest.c
@@ -433,6 +433,7 @@ static void lvs_rh_disconnect(struct usb
struct lvs_rh *lvs = usb_get_intfdata(intf);
sysfs_remove_group(&intf->dev.kobj, &lvs_attr_group);
+ usb_poison_urb(lvs->urb); /* used in scheduled work */
flush_work(&lvs->rh_work);
usb_free_urb(lvs->urb);
}
Patches currently in stable-queue which might be from oneukum@suse.com are
queue-4.9/usb-misc-lvs-fix-race-condition-in-disconnect-handling.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-18 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-18 16:05 Patch "usb: misc: lvs: fix race condition in disconnect handling" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).