linux/drivers/usb/dwc3
Kishon Vijay Abraham I b2fb5b1a0f usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes
DWC3 uses bounce buffer to handle non max packet aligned OUT transfers and
the size of bounce buffer is 512 bytes. However if the host initiates OUT
transfers of size more than 512 bytes (and non max packet aligned), the
driver throws a WARN dump but still programs the TRB to receive more than
512 bytes. This will cause bounce buffer to overflow and corrupt the
adjacent memory locations which can be fatal.

Fix it by programming the TRB to receive a maximum of DWC3_EP0_BOUNCE_SIZE
(512) bytes.

Cc: <stable@vger.kernel.org> # 3.4+
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-30 11:43:33 -05:00
..
core.c usb: dwc3: core: remove unnecessary dev_warn() 2015-07-29 09:59:19 -05:00
core.h Merge 4.1-rc7 into usb-next 2015-06-08 10:57:51 -07:00
debug.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
debug.h usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
debugfs.c usb: dwc3: switch to GPL v2 only 2013-07-29 13:56:44 +03:00
dwc3-exynos.c usb: dwc3: exynos: switch dev_dbg() to dev_info() 2015-07-29 09:59:17 -05:00
dwc3-keystone.c usb: dwc3: keystone: convert dev_dbg() to dev_err() 2015-07-29 09:59:17 -05:00
dwc3-omap.c usb: dwc3: omap: Replace deprecated API of extcon 2015-07-29 09:59:18 -05:00
dwc3-pci.c usb: dwc3: pci: make better use of gpiod API 2015-07-29 09:59:18 -05:00
dwc3-qcom.c usb: dwc3: qcom: switch dev_dbg() to dev_info() 2015-07-29 09:59:17 -05:00
dwc3-st.c usb: dwc3: st: remove two unnecessary messages 2015-07-29 09:59:17 -05:00
ep0.c usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes 2015-07-30 11:43:33 -05:00
gadget.c usb: dwc3: gadget: defer endpoint name change 2015-07-29 09:59:19 -05:00
gadget.h usb: dwc3: gadget: fix set_halt() bug with pending transfers 2014-10-20 15:58:48 -05:00
host.c usb: dwc3: make LPM configurable in DT 2015-03-10 15:33:33 -05:00
io.h usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
Kconfig usb: dwc3: drop CONFIG_USB_DWC3_DEBUG 2015-07-29 09:59:18 -05:00
Makefile usb: dwc3: drop CONFIG_USB_DWC3_DEBUG 2015-07-29 09:59:18 -05:00
platform_data.h usb: dwc3: add hsphy_interface property 2015-05-13 12:06:42 -05:00
trace.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
trace.h usb: dwc3: trace: add trace logs for core and gadget 2015-01-27 13:56:10 -06:00
ulpi.c usb: dwc3: add ULPI interface support 2015-05-13 12:06:52 -05:00