Thread (5 messages) flat view 5 messages, 4 authors, 2012-03-21

Re: use-after-free in usbnet

From: Alan Stern <stern@rowland.harvard.edu>
Date: 2012-03-21 14:35:23

Possibly related (same subject, not in this thread)

On Wed, 21 Mar 2012, Ming Lei wrote:
Looks it is a general issue about usb_hcd_unlink_urb.

Alan, how about increasing URB reference count before calling unlink1
inside usb_hcd_unlink_urb to fix this kind of problem?
No, that won't fix the problem.  The URB could complete and be
deallocated even before usb_hcd_unlink_urb() is called, so nothing that
function can do will prevent the error.

It is the caller's responsibility to make sure that the URB does not 
get freed before usb_unlink_urb() or usb_kill_urb() returns.  We 
probably should mention this in the kerneldoc...

Alan Stern
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help