usb: gadget: f_ecm: Refactor bind path to use __free()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_ecm: Refactor bind path to use __free()
After an bind/unbind cycle, the ecm->notify_req is left stale. If a subsequent bind fails, the unified error label attempts to free this stale request, leading to a NULL pointer dereference when accessing ep->ops->free_request.
Refactor the error handling in the bind path to use the __free() automatic cleanup mechanism.
From the CVE record · Linux
The Linux kernel's USB gadget f_ecm bind path can retain a stale request after a bind/unbind cycle. If a later bind fails, cleanup can dereference a NULL pointer and crash the kernel. The input does not specify attacker access or authentication requirements.
Engineers running Linux kernels with the USB gadget f_ecm component should check their versions; affected versions are not specified.