linux/drivers/usb
Mans Rullgard 52974d94a2 usb: musb: fix crash with highmen PIO and usbmon
When handling a PIO bulk transfer with highmem buffer, a temporary
mapping is assigned to urb->transfer_buffer.  After the transfer is
complete, an invalid address is left behind in this pointer.  This is
not ordinarily a problem since nothing touches that buffer before the
urb is released.  However, when usbmon is active, usbmon_urb_complete()
calls (indirectly) mon_bin_get_data() which does access the transfer
buffer if it is set.  To prevent an invalid memory access here, reset
urb->transfer_buffer to NULL when finished (musb_host_rx()), or do not
set it at all (musb_host_tx()).

Fixes: 8e8a551654 ("usb: musb: host: Handle highmem in PIO mode")
Signed-off-by: Mans Rullgard <mans@mansr.com>
Cc: stable@vger.kernel.org
Signed-off-by: Bin Liu <b-liu@ti.com>
Link: https://lore.kernel.org/r/20200316211136.2274-8-b-liu@ti.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-17 20:03:28 +01:00
..
atm USB: Replace zero-length array with flexible-array member 2020-02-23 19:24:51 +01:00
c67x00
cdns3 usb: cdns3: remove redundant assignment to pointer trb 2020-03-15 11:06:39 +02:00
chipidea USB: chipidea: Use the correct style for SPDX License Identifier 2020-03-16 11:13:47 +08:00
class compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-10 11:41:20 +01:00
core Merge 5.6-rc5 into usb-next 2020-03-10 08:12:46 +01:00
dwc2 USB: changes for v5.7 merge window 2020-03-16 08:22:49 +01:00
dwc3 usb: dwc3: fix up for role switch API change 2020-03-16 08:23:27 +01:00
early remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
gadget usb: get rid of 'choice' for legacy gadget drivers 2020-03-16 08:36:35 +01:00
host xhci-pci: Allow host runtime PM as default for Intel Tiger Lake xHCI 2020-03-12 17:34:49 +01:00
image Merge 5.4-rc3 into usb-next 2019-10-14 07:09:59 +02:00
isp1760 remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
misc Merge 5.6-rc5 into usb-next 2020-03-10 08:12:46 +01:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 usb: roles: Provide the switch drivers handle to the switch in the API 2020-03-04 11:12:50 +01:00
musb usb: musb: fix crash with highmen PIO and usbmon 2020-03-17 20:03:28 +01:00
phy usb: phy: Add driver for the Ingenic JZ4770 USB transceiver 2020-03-12 09:53:08 +01:00
renesas_usbhs phy: for 5.6 2020-01-17 07:52:26 +01:00
roles usb: roles: Allow the role switches to be named 2020-03-04 11:12:50 +01:00
serial Merge 5.6-rc3 into usb-next 2020-02-24 08:48:49 +01:00
storage Merge 5.6-rc5 into usb-next 2020-03-10 08:12:46 +01:00
typec usb: typec: ucsi_ccg: workaround for NVIDIA test device 2020-03-12 09:49:28 +01:00
usbip usbip: Fix error path of vhci_recv_ret_submit() 2019-12-17 16:36:33 +01:00
Kconfig
Makefile
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00