In the Linux kernel, the following vulnerability has been resolved:
usb: dwc3: gadget: Fix looping of queued SG entries
The dwc3request->numqueuedsgs is decremented on completion. If a partially completed request is handled, then the dwc3request->numqueuedsgs no longer reflects the total number of numqueuedsgs (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.