CVE-2026-31755 PUBLISHED

usb: cdns3: gadget: fix NULL pointer dereference in ep_queue

Assigner: Linux
Reserved: 09.03.2026 Published: 01.05.2026 Updated: 01.05.2026

In the Linux kernel, the following vulnerability has been resolved:

usb: cdns3: gadget: fix NULL pointer dereference in ep_queue

When the gadget endpoint is disabled or not yet configured, the ep->desc pointer can be NULL. This leads to a NULL pointer dereference when __cdns3_gadget_ep_queue() is called, causing a kernel crash.

Add a check to return -ESHUTDOWN if ep->desc is NULL, which is the standard return code for unconfigured endpoints.

This prevents potential crashes when ep_queue is called on endpoints that are not ready.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 7733f6c32e36ff9d7adadf40001039bf219b1cbe to 3d1433fe34b224b90259e207e5389e95b504ef04 (excl.)
  • affected from 7733f6c32e36ff9d7adadf40001039bf219b1cbe to fb2ad0c1334a3eccfe4ed203f9eef5a4879226f6 (excl.)
  • affected from 7733f6c32e36ff9d7adadf40001039bf219b1cbe to 9ab9b0e5fcdac325f950fc8b6caa08a9e22a0db9 (excl.)
  • affected from 7733f6c32e36ff9d7adadf40001039bf219b1cbe to d61446dfc9d387775bb1b95b081953201b9222af (excl.)
  • affected from 7733f6c32e36ff9d7adadf40001039bf219b1cbe to 390536cc6af4ca5566bc3bf1f8b704700380cd2c (excl.)
  • affected from 7733f6c32e36ff9d7adadf40001039bf219b1cbe to 14bf08ab2cdfcdfd3f13e799d06692a1b3e0745f (excl.)
  • affected from 7733f6c32e36ff9d7adadf40001039bf219b1cbe to 7f6f127b9bc34bed35f56faf7ecb1561d6b39000 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.4 is affected
  • unaffected from 0 to 5.4 (excl.)
  • unaffected from 5.15.203 to 5.15.* (incl.)
  • unaffected from 6.1.168 to 6.1.* (incl.)
  • unaffected from 6.6.134 to 6.6.* (incl.)
  • unaffected from 6.12.81 to 6.12.* (incl.)
  • unaffected from 6.18.22 to 6.18.* (incl.)
  • unaffected from 6.19.12 to 6.19.* (incl.)
  • unaffected from 7.0 to * (incl.)

References