usb: gadget: renesas_usb3: validate endpoint index in standard request handlers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 746bfe63bba37ad55956b7377c9af494e7e28929 · < 44216e3dd4455b798899b50eedb0ec3831dff8e0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: renesas_usb3: validate endpoint index in standard request handlers
The GET_STATUS and SET/CLEAR_FEATURE handlers extract the endpoint number from the host-supplied wIndex without any sort of validation. Fix this up by validating the number of endpoints actually match up with the number the device has before attempting to dereference a pointer based on this math.
This is just like what was done in commit ee0d382feb44 ("usb: gadget: aspeed_udc: validate endpoint index for ast udc") for the aspeed driver.
From the CVE record · Linux
The Linux kernel’s renesas_usb3 USB gadget driver does not validate the endpoint number in host-supplied standard requests before using it to access an endpoint pointer. A connected USB host can supply an invalid endpoint number in a GET_STATUS or SET/CLEAR_FEATURE request, potentially causing a null pointer dereference. No authentication requirement is specified.
Engineers running Linux kernels with the renesas_usb3 USB gadget driver should check their kernel; affected versions are not specified.