usb: gadget: f_hid: fix refcount leak on error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 21a9476a7ba847e413bf1c144d7c614532aed6dd · < 216437dd64fce36791a3b6cc8f8013df36856958| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_hid: fix refcount leak on error path
When failing to allocate report_desc, opts->refcnt has already been incremented so it needs to be decremented to avoid leaving the options structure permanently locked.
From the CVE record · Linux
The Linux kernel’s USB HID gadget function has a reference-count leak when allocation of report_desc fails. This can leave the options structure permanently locked. The input does not establish how an attacker could trigger the failure or whether access or user interaction is required.
Engineers running the Linux kernel should check whether their builds include the affected USB HID gadget function; affected versions were not provided.