Patch "usb: misc: lvs: fix race condition in disconnect handling" has been added to the 4.9-stable tree
Subsystems (2)
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 <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Mar 18 16:55:33 CET 2018
From: Oliver Neukum <[email protected]>
Date: Tue, 14 Mar 2017 12:05:07 +0100
Subject: usb: misc: lvs: fix race condition in disconnect handling
From: Oliver Neukum <[email protected]>
[ 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.
--- drivers/usb/misc/lvstest.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/misc/lvstest.c +1 -0
@@ -433,6 +433,7 @@ static void lvs_rh_disconnect(struct usbstruct 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 [email protected] are
queue-4.9/usb-misc-lvs-fix-race-condition-in-disconnect-handling.patch