USB: gadget: validate endpoint index for xilinx udc
authorSzymon Heidrich <szymon.heidrich@gmail.com>
Mon, 21 Feb 2022 12:24:56 +0000 (13:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2022 10:33:58 +0000 (11:33 +0100)
commitfdc22192d49fa577d8397b39f8ef8141cb1d62aa
tree2ab486342f553c65d35fec60b13a230b6ec3da37
parent669c2b178956718407af5631ccbc61c24413f038
USB: gadget: validate endpoint index for xilinx udc

commit 7f14c7227f342d9932f9b918893c8814f86d2a0d upstream.

Assure that host may not manipulate the index to point
past endpoint array.

Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/udc-xilinx.c