usb: dwc3: gadget: Fix looping of queued SG entries
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c96e6725db9d6a04ac1bee881e3034b636d9f71c · < 70777a23a54e359cfdfafc625a57cd56434f3859| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: dwc3: gadget: Fix looping of queued SG entries
The dwc3_request->num_queued_sgs is decremented on completion. If a partially completed request is handled, then the dwc3_request->num_queued_sgs no longer reflects the total number of num_queued_sgs (it would be cleared).
Correctly check the number of request SG entries remained to be prepare and queued. Failure to do this may cause null pointer dereference when accessing non-existent SG entry.
From the CVE record · Linux
The Linux kernel’s USB dwc3 gadget code can incorrectly track queued scatter-gather entries after a request partially completes. It may then access a nonexistent entry, causing a null pointer dereference. The input does not specify attacker access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the USB dwc3 gadget code should check their deployments; affected versions are not specified.