linux/drivers/media
Wenwen Wang a26ac6c1be media: isif: fix a NULL pointer dereference bug
In isif_probe(), there is a while loop to get the ISIF base address and
linearization table0 and table1 address. In the loop body, the function
platform_get_resource() is called to get the resource. If
platform_get_resource() returns NULL, the loop is terminated and the
execution goes to 'fail_nobase_res'. Suppose the loop is terminated at the
first iteration because platform_get_resource() returns NULL and the
execution goes to 'fail_nobase_res'. Given that there is another while loop
at 'fail_nobase_res' and i equals to 0, one iteration of the second while
loop will be executed. However, the second while loop does not check the
return value of platform_get_resource(). This can cause a NULL pointer
dereference bug if the return value is a NULL pointer.

This patch avoids the above issue by adding a check in the second while
loop after the call to platform_get_resource().

Signed-off-by: Wenwen Wang <wang6495@umn.edu>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-10-09 08:02:52 -04:00
..
cec media: cec: name for RC passthrough device does not need 'RC for' 2018-10-05 11:28:13 -04:00
common media: rc: Remove init_ir_raw_event and DEFINE_IR_RAW_EVENT macros 2018-10-04 14:22:27 -04:00
dvb-core media: dvb: use signal types to discover pads 2018-09-17 13:16:19 -04:00
dvb-frontends media: au8522: declare its own pads 2018-09-17 13:16:19 -04:00
firewire media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
i2c media: dw9807-vcm: Fix probe error handling 2018-10-08 11:51:31 -04:00
mmc media: siano: use GFP_DMA only for smssdio 2018-05-15 08:04:42 -04:00
pci media: cx23885: make const array addr_list static 2018-10-09 08:02:15 -04:00
platform media: isif: fix a NULL pointer dereference bug 2018-10-09 08:02:52 -04:00
radio media: replace strcpy() by strscpy() 2018-09-11 13:32:17 -04:00
rc media: rc: mce_kbd: input events via rc-core's input device 2018-10-05 06:56:24 -04:00
spi media: cxd2880-spi: Modified how to declare structure 2018-05-05 10:37:12 -04:00
tuners media: si2157: declare its own pads 2018-09-17 13:16:19 -04:00
usb Revert "media: dvbsky: use just one mutex for serializing device R/W ops" 2018-10-05 11:04:39 -04:00
v4l2-core media: v4l: ctrl: Provide unlocked variant of v4l2_ctrl_grab 2018-10-05 09:37:45 -04:00
Kconfig media: cec: Kconfig coding style issue 2018-05-09 16:26:50 -04:00
Makefile
media-device.c media: use strscpy() instead of strlcpy() 2018-09-11 13:32:17 -04:00
media-devnode.c MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
media-entity.c media: v4l2-mc: switch it to use the new approach to setup pipelines 2018-09-17 13:16:19 -04:00