usb: gadget: fix null pointer dereference in usb_put_function_instance()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0062f6e56f70bd2230ba1ebd1667d1b32a1af3b2 · < d3a7fa61997db3bf6dadef4c1bd87a4fa782a817| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: fix null pointer dereference in usb_put_function_instance()
usb_put_function_instance() attempts to dereference fd inside fi struct to get mod in uvc_alloc_inst() error path. However, fd is not allocated until later in try_get_usb_function_instance() after allocating fi in uvc_alloc_inst() and thus guranteed to be null in error path. Fix this by adding a null check for fi->fd that returns if fd is null.
From the CVE record · Linux
The Linux kernel’s USB gadget code can dereference a null pointer in usb_put_function_instance() when uvc_alloc_inst() takes an error path before fd is allocated. The input does not specify whether an attacker can trigger this path or what access or interaction would be required.
Teams running the Linux kernel should check their versions; affected versions are not specified.