OrangePi_CM5/drivers/media/usb
Pavel Skripkin a3304766d9 media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
[ Upstream commit 471bec68457aaf981add77b4f590d65dd7da1059 ]

Syzbot reported that -1 is used as array index. The problem was in
missing validation check.

hdw->unit_number is initialized with -1 and then if init table walk fails
this value remains unchanged. Since code blindly uses this member for
array indexing adding sanity check is the easiest fix for that.

hdw->workpoll initialization moved upper to prevent warning in
__flush_work.

Reported-and-tested-by: syzbot+1a247e36149ffd709a9b@syzkaller.appspotmail.com

Fixes: d855497edb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:21:08 +02:00
..
airspy
as102
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
dvb-usb media: m920x: don't use stack on USB reads 2022-01-27 10:54:14 +01:00
dvb-usb-v2 media: mxl111sf: change mutex_init() location 2021-12-22 09:30:58 +01:00
em28xx media: Revert "media: em28xx: add missing em28xx_close_extension" 2022-04-08 14:40:36 +02:00
go7007 media: usb: go7007: s2250-board: fix leak in probe() 2022-04-08 14:40:07 +02:00
gspca media: gspca/sunplus: fix zero-length control requests 2021-07-19 09:45:02 +02:00
hackrf
hdpvr media: hdpvr: initialize dev->worker at hdpvr_register_videodev 2022-04-08 14:40:36 +02:00
msi2500 media: msi2500: assign SPI bus number dynamically 2020-12-26 16:02:45 +01:00
pvrusb2 media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init 2022-06-09 10:21:08 +02: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
stk1160 media: stk1160: If start stream fails, return buffers with VB2_BUF_STATE_QUEUED 2022-04-08 14:40:09 +02: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
ttusb-dec
usbtv media: usbtv: Fix deadlock on suspend 2021-03-17 17:06:20 +01:00
uvc media: uvcvideo: Fix missing check to determine if element is found in list 2022-06-09 10:21:06 +02:00
zr364xx media: drivers/media/usb: fix memory leak in zr364xx_probe 2021-08-26 08:35:34 -04:00
Kconfig
Makefile