CVE-2026-31615: usb: gadget: renesas_usb3: validate endpoint index in standard request handlers
From: Greg Kroah-Hartman <[email protected]>
Description
===========
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.
The Linux kernel CVE team has assigned CVE-2026-31615 to this issue.
Affected and fixed versions
===========================
Fixed in 6.12.83 with commit adb8014599fdf0818d3d93f1f74e06cd0bdec08d Fixed in 6.18.24 with commit 44216e3dd4455b798899b50eedb0ec3831dff8e0 Fixed in 6.19.14 with commit 37f430b2240655e6b0199a92aa1057e4d621be51 Fixed in 7.0.1 with commit e3d42598f2995cdc07b7779874e7c5f8a1b773db
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-31615
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/usb/gadget/udc/renesas_usb3.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/adb8014599fdf0818d3d93f1f74e06cd0bdec08d https://git.kernel.org/stable/c/44216e3dd4455b798899b50eedb0ec3831dff8e0 https://git.kernel.org/stable/c/37f430b2240655e6b0199a92aa1057e4d621be51 https://git.kernel.org/stable/c/e3d42598f2995cdc07b7779874e7c5f8a1b773db https://git.kernel.org/stable/c/f880aac8a57ebd92abfa685d45424b2998ac1059