linux/drivers/media/usb
Anton Vasilyev a79327bb01 media: dw2102: Fix use after free
[ Upstream commit 589a9f0eb7 ]

dvb_usb_device_init stores parts of properties at d->props
and d->desc and uses it on dvb_usb_device_exit.
Free of properties on module probe leads to use after free.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204597

The patch makes properties static instead of allocated on heap to prevent
memleak and use after free.
Also fixes s421_properties.devices initialization to have 2 element
instead of 6 copied from p7500_properties.

[mchehab: fix function call alignments]
Link: https://lore.kernel.org/linux-media/20190822104147.4420-1-vasilyev@ispras.ru
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Fixes: 299c7007e9 ("media: dw2102: Fix memleak on sequence of probes")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 10:53:56 +01:00
..
airspy media: media/usb: don't set description in ENUM_FMT 2019-07-22 14:01:05 -04:00
as102 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
au0828 media: au0828: fix a NULL vs IS_ERR() check 2021-07-14 16:56:05 +02:00
b2c2 media: flexcop-usb: fix control-message timeouts 2022-01-27 10:53:42 +01:00
cpia2 media: cpia2: fix control-message timeouts 2022-01-27 10:53:42 +01:00
cx231xx Linux 5.9-rc4 2020-09-07 16:13:06 +02:00
dvb-usb media: dw2102: Fix use after free 2022-01-27 10:53:56 +01:00
dvb-usb-v2 media: mxl111sf: change mutex_init() location 2021-12-22 09:30:58 +01:00
em28xx media: em28xx: fix memory leak in em28xx_init_dev 2022-01-27 10:53:48 +01:00
go7007 media: go7007: remove redundant initialization 2021-09-15 09:50:33 +02:00
gspca media: gspca/sunplus: fix zero-length control requests 2021-07-19 09:45:02 +02:00
hackrf Linux 5.2-rc4 2019-06-11 12:09:28 -04:00
hdpvr media: usb: hdpvr: convert to use i2c_new_client_device() 2020-04-14 11:31:48 +02:00
msi2500 media: msi2500: assign SPI bus number dynamically 2020-12-26 16:02:45 +01:00
pvrusb2 media: pvrusb2: fix control-message timeouts 2022-01-27 10:53:43 +01:00
pwc media: pwc: Use correct device for DMA 2021-02-23 15:53:25 +01:00
s2255 media: s2255: fix control-message timeouts 2022-01-27 10:53:42 +01:00
siano media: Use fallthrough pseudo-keyword 2020-08-29 08:35:27 +02:00
stk1160 media: stk1160: fix control-message timeouts 2022-01-27 10:53:43 +01:00
stkwebcam media: stkwebcam: fix memory leak in stk_camera_probe 2021-09-08 08:49:02 +02:00
tm6000 media: tm6000: Avoid card name truncation 2021-11-18 14:04:05 +01:00
ttusb-budget media: dvb-ttusb-budget: cleanup printk logic 2020-09-03 11:15:47 +02:00
ttusb-dec media: ttusb-dec: convert tasklets to use new tasklet_setup() API 2020-08-29 08:14:42 +02:00
usbtv media: usbtv: Fix deadlock on suspend 2021-03-17 17:06:20 +01:00
uvc media: uvcvideo: fix division by zero at stream start 2022-01-20 09:17:50 +01:00
zr364xx media: drivers/media/usb: fix memory leak in zr364xx_probe 2021-08-26 08:35:34 -04:00
Kconfig media: move CEC USB drivers to a separate directory 2020-04-15 12:06:40 +02:00
Makefile media: move CEC USB drivers to a separate directory 2020-04-15 12:06:40 +02:00