]> git.dujemihanovic.xyz Git - u-boot.git/commit
Fix out of bound access of ep array.
authorAlison Huffman <alisn@google.com>
Thu, 22 Sep 2022 04:01:32 +0000 (04:01 +0000)
committerMarek Vasut <marex@denx.de>
Sun, 25 Sep 2022 23:49:36 +0000 (01:49 +0200)
commit206af3dec00071ec96c0fdec6c8dda3a039c07cf
tree0049fa5ea0ac297a99765643d2a40d3128874af8
parent693765a720ba4f116923372deb0c32488f031cf8
Fix out of bound access of ep array.

When processing USB_REQ_CLEAR_FEATURE, USB_REQ_SET_FEATURE, and
USB_REQ_GET_STATUS packets in dwc2_ep0_setup an out of bounds access
can occur. This is caused by the wIndex field of the usb control packet
being used as an index into an array whose size is DWC2_MAX_ENDPOINTS (4).

Signed-off-by: Alison Huffman <alisn@google.com>
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c