usb: gadget: uvc: Prevent buffer overflow in setup handler
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cdda479f15cd13fa50a913ca85129c0437cc7b91 · < 6b41a35b41f77821db24f2d8f66794b390a585c5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: uvc: Prevent buffer overflow in setup handler
Setup function uvc_function_setup permits control transfer requests with up to 64 bytes of payload (UVC_MAX_REQUEST_SIZE), data stage handler for OUT transfer uses memcpy to copy req->actual bytes to uvc_event->data.data array of size 60. This may result in an overflow of 4 bytes.
From the CVE record · Linux
The Linux kernel's USB gadget UVC setup handler permits control transfer payloads of up to 64 bytes, but the OUT transfer handler copies them into a 60-byte array. An OUT transfer with more than 60 bytes can overflow the array by up to four bytes. The input does not specify authentication or user-interaction requirements.
Engineers running the Linux kernel should check whether their kernel includes the affected USB gadget UVC handler; affected versions are not specified.