OpenCloudOS-Kernel/drivers/media
Zheyu Ma 7d12e918f2 media: lgdt3306a: Add a check against null-pointer-def
commit c1115ddbda9c930fba0fdd062e7a8873ebaf898d upstream.

The driver should check whether the client provides the platform_data.

The following log reveals it:

[   29.610324] BUG: KASAN: null-ptr-deref in kmemdup+0x30/0x40
[   29.610730] Read of size 40 at addr 0000000000000000 by task bash/414
[   29.612820] Call Trace:
[   29.613030]  <TASK>
[   29.613201]  dump_stack_lvl+0x56/0x6f
[   29.613496]  ? kmemdup+0x30/0x40
[   29.613754]  print_report.cold+0x494/0x6b7
[   29.614082]  ? kmemdup+0x30/0x40
[   29.614340]  kasan_report+0x8a/0x190
[   29.614628]  ? kmemdup+0x30/0x40
[   29.614888]  kasan_check_range+0x14d/0x1d0
[   29.615213]  memcpy+0x20/0x60
[   29.615454]  kmemdup+0x30/0x40
[   29.615700]  lgdt3306a_probe+0x52/0x310
[   29.616339]  i2c_device_probe+0x951/0xa90

Link: https://lore.kernel.org/linux-media/20220405095018.3993578-1-zheyuma97@gmail.com
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-16 13:47:32 +02:00
..
cec media: cec: core: avoid confusing "transmit timed out" message 2024-06-12 11:12:43 +02:00
common media: videobuf2: request more buffers for vb2_read 2024-04-27 17:11:30 +02:00
dvb-core media: edia: dvbdev: fix a use-after-free 2024-03-26 18:19:45 -04:00
dvb-frontends media: lgdt3306a: Add a check against null-pointer-def 2024-06-16 13:47:32 +02:00
firewire media: firewire: firedtv-avc.c: replace BUG with proper, error return 2023-08-10 07:58:37 +02:00
i2c media: ov2680: Do not fail if data-lanes property is absent 2024-06-12 11:12:38 +02:00
mc media: mc: Expand MUST_CONNECT flag to always require an enabled link 2024-04-03 15:28:17 +02:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: ipu3-cio2: Request IRQ earlier 2024-06-12 11:12:01 +02:00
platform media: vsp1: Remove unbalanced .s_stream(0) calls 2024-06-12 11:13:02 +02:00
radio media: radio-shark2: Avoid led_names truncations 2024-06-12 11:12:01 +02:00
rc pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() 2024-06-12 11:12:24 +02:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: visl: Hook the (TRY_)DECODER_CMD stateless ioctls 2024-01-25 15:35:32 -08:00
tuners media: xc4000: Fix atomicity violation in xc4000_get_frequency 2024-04-03 15:28:17 +02:00
usb media: flexcop-usb: fix sanity check of bNumEndpoints 2024-06-12 11:12:42 +02:00
v4l2-core media: v4l: Don't turn on privacy LED if streamon fails 2024-06-12 11:12:37 +02:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00