usb: hcd: out of bounds access in for_each_companion
authorRobert Dobrowolski <robert.dobrowolski@linux.intel.com>
Thu, 24 Mar 2016 10:30:07 +0000 (03:30 -0700)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:50 +0000 (10:42 +0200)
commit7fbd6329c2f17ffcca4d846fac0ba2870ce7947b
treefbcddd6ee7ce484d247e17225d9fb2584fdc7b73
parente1d540872b9866c587a534815a482373bab8e8a8
usb: hcd: out of bounds access in for_each_companion

commit e86103a75705c7c530768f4ffaba74cf382910f2 upstream.

On BXT platform Host Controller and Device Controller figure as
same PCI device but with different device function. HCD should
not pass data to Device Controller but only to Host Controllers.
Checking if companion device is Host Controller, otherwise skip.

Cc: <stable@vger.kernel.org>
Signed-off-by: Robert Dobrowolski <robert.dobrowolski@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/core/hcd-pci.c