linux/drivers/media
Wang Hai 3d5831a40d media: msi001: fix possible null-ptr-deref in msi001_probe()
I got a null-ptr-deref report:

BUG: kernel NULL pointer dereference, address: 0000000000000060
...
RIP: 0010:v4l2_ctrl_auto_cluster+0x57/0x270
...
Call Trace:
 msi001_probe+0x13b/0x24b [msi001]
 spi_probe+0xeb/0x130
...
 do_syscall_64+0x35/0xb0

In msi001_probe(), if the creation of control for bandwidth_auto
fails, there will be a null-ptr-deref issue when it is used in
v4l2_ctrl_auto_cluster().

Check dev->hdl.error before v4l2_ctrl_auto_cluster() to fix this bug.

Link: https://lore.kernel.org/linux-media/20211026112348.2878040-1-wanghai38@huawei.com
Fixes: 93203dd6c7 ("[media] msi001: Mirics MSi001 silicon tuner driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-12-14 15:09:14 +01:00
..
cec media: cec: fix a deadlock situation 2021-12-07 11:29:56 +01:00
common media: b2c2: flexcop: Convert to SPDX identifier 2021-12-07 11:29:58 +01:00
dvb-core media: dvb-core: dvb_frontend: address some clang warnings 2021-11-29 10:15:04 +01:00
dvb-frontends media: media si2168: Fix spelling mistake "previsously" -> "previously" 2021-12-07 11:29:57 +01:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-09-30 10:07:54 +02:00
i2c media: i2c: max9286: Get rid of duplicate of_node assignment 2021-12-14 15:09:13 +01:00
mc media: mc: drop an unused debug function 2021-11-29 10:15:04 +01:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: pt3: Switch to using functions pcim_* and devm_* 2021-12-14 15:09:14 +01:00
platform media: rockchip: rkisp1: use device name for debugfs subdir name 2021-12-14 15:09:14 +01:00
radio media: si470x-i2c: fix possible memory leak in si470x_i2c_probe() 2021-11-30 12:00:53 +01:00
rc media: streamzap: remove redundant gap calculations 2021-12-14 15:09:13 +01:00
spi media: cxd2880: Eliminate dead code 2021-12-07 11:29:57 +01:00
test-drivers media: replace setting of bytesused with vb2_set_plane_payload 2021-12-07 11:29:56 +01:00
tuners media: msi001: fix possible null-ptr-deref in msi001_probe() 2021-12-14 15:09:14 +01:00
usb media: dw2102: Fix use after free 2021-12-14 15:09:14 +01:00
v4l2-core Linux 5.16-rc4 2021-12-07 11:29:41 +01:00
Kconfig media: correct MEDIA_TEST_SUPPORT help text 2021-11-15 08:12:06 +00:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00