1
0
Fork 0
alistair23-linux/drivers/usb
Yoshihiro Shimoda 5dac665cf4 usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role"
Since the role_store() uses strncmp(), it's possible to refer
out-of-memory if the sysfs data size is smaller than strlen("host").
This patch fixes it by using sysfs_streq() instead of strncmp().

Fixes: cc995c9ec1 ("usb: gadget: udc: renesas_usb3: add support for usb role swap")
Cc: <stable@vger.kernel.org> # v4.12+
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2019-08-12 08:55:24 +03:00
..
atm USB: atm: ueagle-atm.c: remove redundant license text 2019-06-03 15:21:57 +02:00
c67x00 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
chipidea - Add imx7ulp support. 2019-07-05 07:19:28 +02:00
class docs: usb: rename files to .rst and add them to drivers-api 2019-06-20 14:28:36 +02:00
common USB: move usb debugfs directory creation to the usb common core 2019-06-06 08:59:19 +02:00
core usb: setup authorized_default attributes using usb_bus_notify 2019-08-08 16:07:34 +02:00
dwc2 USB: more changes for v5.3 merge window 2019-07-03 13:48:54 +02:00
dwc3 Revert "usb:gadget Separated decoding functions from dwc3 driver." 2019-07-04 13:02:09 +02:00
early drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
gadget usb: gadget: udc: renesas_usb3: Fix sysfs interface of "role" 2019-08-12 08:55:24 +03:00
host xhci: Fix NULL pointer dereference at endpoint zero reset. 2019-08-02 18:13:49 +02:00
image scsi: usb: image: microtek: use sg helper to iterate over scatterlist 2019-06-20 15:21:32 -04:00
isp1760 usb: isp1760-hcd: Fix fall-through annotations 2019-05-01 18:13:52 +02:00
misc usb: iowarrior: fix deadlock on disconnect 2019-08-08 12:43:18 +02:00
mon docs: usb: rename files to .rst and add them to drivers-api 2019-06-20 14:28:36 +02:00
mtu3 Revert "usb: mtu3: fix up undefined reference to usb_debug_root" 2019-06-10 19:43:57 +02:00
musb usb: musb: dsps: Use dev_get_drvdata() 2019-04-30 17:55:08 +02:00
phy Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
renesas_usbhs USB: more changes for v5.3 merge window 2019-07-03 13:48:54 +02:00
roles device connection: Find connections also by checking the references 2019-06-03 10:55:38 +02:00
serial USB-serial updates for 5.3-rc1 2019-07-03 09:20:31 +02:00
storage usb-storage: Add a limitation for blk_queue_max_hw_sectors() 2019-07-25 10:40:02 +02:00
typec usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests 2019-08-02 18:18:10 +02:00
usbip usbip: Replace unused kvec array with single variable in vhci_send_cmd_unlink() 2019-06-05 11:54:38 +02:00
wusbcore wusb: switch to cbcmac transform 2019-06-18 08:52:34 +02:00
Kconfig dma-mapping updates for Linux 5.3 2019-07-12 15:13:55 -07:00
Makefile Revert "usb:cdns3 Add Cadence USB3 DRD Driver" 2019-07-04 13:01:33 +02:00
usb-skeleton.c usb: usb-skeleton: use irqsave() in USB's complete callback 2018-06-28 19:36:06 +09:00