diff options
| author | 2022-09-06 10:21:19 +0800 | |
|---|---|---|
| committer | 2022-09-22 15:52:30 +0200 | |
| commit | eea4c860c3b366369eff0489d94ee4f0571d467d (patch) | |
| tree | 4c3e6bc5887f8ceff2266cc1cb17bb91079590e9 /include/linux/mfd/git:/ssh:/git@git.zx2c4.com | |
| parent | usb: dwc3: pci: Add PCIe device ID for USB3 controller on CPU sub-system for Alder Lake P (diff) | |
| download | linux-dev-eea4c860c3b366369eff0489d94ee4f0571d467d.tar.xz linux-dev-eea4c860c3b366369eff0489d94ee4f0571d467d.zip | |
usb: musb: Fix musb_gadget.c rxstate overflow bug
The usb function device call musb_gadget_queue() adds the passed
request to musb_ep::req_list,If the (request->length > musb_ep->packet_sz)
and (is_buffer_mapped(req) return false),the rxstate() will copy all data
in fifo to request->buf which may cause request->buf out of bounds.
Fix it by add the length check :
fifocnt = min_t(unsigned, request->length - request->actual, fifocnt);
Signed-off-by: Robin Guo <guoweibin@inspur.com>
Link: https://lore.kernel.org/r/20220906102119.1b071d07a8391ff115e6d1ef@inspur.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/mfd/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
