]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: xhci: Check URB's actual transfer buffer size.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 27 Aug 2009 21:36:24 +0000 (14:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:32:51 +0000 (09:32 -0700)
commit1eb1b69f40b9ee5f5645109f380be78daf8e9ddd
tree98250e421fd383c24e86323fbb2952115024ba0b
parent851834e4a2bd1015b05b201aff79adb643d97f10
USB: xhci: Check URB's actual transfer buffer size.

commit 99eb32db45061443ab7552b8fdceae68b90fde55 upstream.

Make sure that the amount of data the xHC says was transmitted is less
than or equal to the size of the requested transfer buffer.  Before, if
the host controller erroneously reported that the number of bytes
untransferred was bigger than the buffer in the URB, urb->actual_length
could be set to a very large size.

Make sure urb->actual_length <= urb->transfer_buffer_length.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci-ring.c