linux/drivers/usb/core
Kars Mulder ebb2342360 usb: core: fix quirks_param_set() writing to a const pointer
[ Upstream commit b1b6bed3b5 ]

The function quirks_param_set() takes as argument a const char* pointer
to the new value of the usbcore.quirks parameter. It then casts this
pointer to a non-const char* pointer and passes it to the strsep()
function, which overwrites the value.

Fix this by creating a copy of the value using kstrdup() and letting
that copy be written to by strsep().

Fixes: 027bd6cafd ("usb: core: Add "quirks" parameter for usbcore")
Signed-off-by: Kars Mulder <kerneldev@karsmulder.nl>

Link: https://lore.kernel.org/r/5ee2-5f048a00-21-618c5c00@230659773
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-19 08:14:58 +02:00
..
buffer.c
config.c USB: core: add endpoint-blacklist quirk 2020-02-28 16:38:46 +01:00
devices.c
devio.c usb: usbfs: Suppress problematic bind and unbind uevents. 2019-12-31 16:35:16 +01:00
driver.c
endpoint.c
file.c
generic.c
hcd-pci.c
hcd.c
hub.c usb: core: hub: limit HUB_QUIRK_DISABLE_AUTOSUSPEND to USB5534B 2020-05-20 08:18:47 +02:00
hub.h USB: hub: Fix the broken detection of USB3 device in SMSC hub 2020-02-28 16:38:47 +01:00
Kconfig
ledtrig-usbport.c
Makefile
message.c USB: core: Fix misleading driver bug report 2020-05-27 17:37:34 +02:00
notify.c
of.c
otg_whitelist.h
phy.c
phy.h
port.c usb: core: port: do error out if usb_autopm_get_interface() fails 2020-03-11 14:14:59 +01:00
quirks.c usb: core: fix quirks_param_set() writing to a const pointer 2020-08-19 08:14:58 +02:00
sysfs.c
urb.c usb: core: urb: fix URB structure initialization function 2019-12-17 20:34:41 +01:00
usb-acpi.c
usb.c
usb.h USB: core: add endpoint-blacklist quirk 2020-02-28 16:38:46 +01:00