usb: cdns3: gadget: fix NULL pointer dereference in ep_queue
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7733f6c32e36ff9d7adadf40001039bf219b1cbe · < 390536cc6af4ca5566bc3bf1f8b704700380cd2c| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s cdns3 USB gadget code can dereference a NULL pointer when an endpoint is disabled or not yet configured and its queue function is called, causing a kernel crash. The input does not establish an attacker path or specify network access, authentication requirements, or user interaction.
Engineers running the Linux kernel with the cdns3 USB gadget driver should check their versions; affected versions are not specified.