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 USB: core: Fix bug caused by duplicate interface PM usage counter 2019-05-08 07:21:44 +02:00
endpoint.c
file.c USB: core: Fix races in character device registration and deregistraion 2019-08-25 10:47:59 +02:00
generic.c
hcd-pci.c usb: hcd: use managed device resources 2019-09-06 10:22:15 +02:00
hcd.c usb: core: Add PM runtime calls to usb_hcd_platform_shutdown 2019-05-31 06:46:30 -07:00
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 USB: leds: fix regression in usbport led trigger 2019-01-31 08:14:34 +01:00
Makefile
message.c USB: core: Fix misleading driver bug report 2020-05-27 17:37:34 +02:00
notify.c
of.c usb: Change usb_of_get_companion_dev() place to usb/common 2018-09-10 20:40:29 +02:00
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 USB: Add new USB LPM helpers 2019-05-02 09:58:56 +02:00
urb.c usb: core: urb: fix URB structure initialization function 2019-12-17 20:34:41 +01:00
usb-acpi.c
usb.c USB: check usb_get_extra_descriptor for proper size 2018-12-13 09:16:15 +01:00
usb.h USB: core: add endpoint-blacklist quirk 2020-02-28 16:38:46 +01:00