usb: dwc3: gadget: check that event count does not exceed event buffer length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 72246da40f3719af3bfd104a2365b32537c27d83 · < 52a7c9d930b95aa8b1620edaba4818040c32631f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: dwc3: gadget: check that event count does not exceed event buffer length
The event count is read from register DWC3_GEVNTCOUNT. There is a check for the count being zero, but not for exceeding the event buffer length. Check that event count does not exceed event buffer length, avoiding an out-of-bounds access when memcpy'ing the event. Crash log: Unable to handle kernel paging request at virtual address ffffffc0129be000 pc : __memcpy+0x114/0x180 lr : dwc3_check_event_buf+0xec/0x348 x3 : 0000000000000030 x2 : 000000000000dfc4 x1 : ffffffc0129be000 x0 : ffffff87aad60080 Call trace: __memcpy+0x114/0x180 dwc3_interrupt+0x24/0x34
From the CVE record · Linux
The Linux kernel's USB DWC3 gadget code does not check whether the event count exceeds the event buffer length, which can cause an out-of-bounds access when copying an event and crash the kernel. The input does not establish whether an attacker can trigger this or what access or user interaction would be required.
Engineers running the Linux kernel with the USB DWC3 gadget code should check their systems; affected versions are not specified.