summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorHaimin Zhang <tcs.kernel@gmail.com>2021-11-13 11:53:20 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-17 14:34:18 +0100
commit9933698f6119886c110750e67c10ac66f12b730f (patch)
tree19d05d36cb75e7638a3ad5e0d0e9f8856639b939 /drivers/usb/gadget
parent4ce3b45704d5ef46fb4b28083c8aba6716fabf3b (diff)
downloadlinux-9933698f6119886c110750e67c10ac66f12b730f.tar.gz
linux-9933698f6119886c110750e67c10ac66f12b730f.tar.bz2
linux-9933698f6119886c110750e67c10ac66f12b730f.zip
USB: ehci_brcm_hub_control: Improve port index sanitizing
Due to (wIndex & 0xff) - 1 can get an integer greater than 15, this can cause array index to be out of bounds since the size of array port_status is 15. This change prevents a possible out-of-bounds pointer computation by forcing the use of a valid port number. Reported-by: TCS Robot <tcs_robot@tencent.com> Signed-off-by: Haimin Zhang <tcs.kernel@gmail.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20211113165320.GA59686@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget')
0 files changed, 0 insertions, 0 deletions