linux/drivers/media/pci
Zhou Qingyang 3af86b0469 media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach()
In hexium_attach(dev, info), saa7146_vv_init() is called to allocate
a new memory for dev->vv_data. saa7146_vv_release() will be called on
failure of saa7146_register_device(). There is a dereference of
dev->vv_data in saa7146_vv_release(), which could lead to a NULL
pointer dereference on failure of saa7146_vv_init().

Fix this bug by adding a check of saa7146_vv_init().

This bug was found by a static analyzer. The analysis employs
differential checking to identify inconsistent security operations
(e.g., checks or kfrees) between two code paths and confirms that the
inconsistent operations are not recovered in the current function or
the callers, so they constitute bugs.

Note that, as a bug found by static analysis, it can be a false
positive or hard to trigger. Multiple researchers have cross-reviewed
the bug.

Builds with CONFIG_VIDEO_HEXIUM_GEMINI=m show no new warnings,
and our static analyzer no longer warns about this code.

Link: https://lore.kernel.org/linux-media/20211203154030.111210-1-zhou1615@umn.edu
Signed-off-by: Zhou Qingyang <zhou1615@umn.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-12-14 15:09:14 +01:00
..
b2c2 media: b2c2: Add missing check in flexcop_pci_isr: 2021-11-19 15:40:09 +00:00
bt8xx media: bttv: use DEVICE_ATTR_RO() helper macro 2021-12-07 11:29:58 +01:00
cobalt media: cobalt: drop an unused variable 2021-11-29 13:23:25 +01:00
cx18 media: cx18: drop an unused macro 2021-11-22 08:32:02 +00:00
cx88 media: pci: cx88: switch from 'pci_' to 'dma_' API 2021-06-17 10:24:41 +02:00
cx23885 media: cx23885: Fix snd_card_free call on null card pointer 2021-09-30 10:08:00 +02:00
cx25821 media: cx25821: drop duplicated i2c_slave_did_ack() 2021-11-22 08:24:03 +00:00
ddbridge media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
dm1105
dt3155
intel media: ipu3-cio2: Add INT347A to cio2-bridge 2021-11-30 10:59:06 +01:00
ivtv media: ivtv: drop an unused macro 2021-11-22 08:29:50 +00:00
mantis media: mantis: remove orphan mantis_core.c 2021-03-22 17:27:13 +01:00
meye
netup_unidvb media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
ngene media: ngene: Fix out-of-bounds bug in ngene_command_config_free_buf() 2021-07-19 19:33:46 -05:00
pluto2 media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
pt1 media: switch from 'pci_' to 'dma_' API 2021-09-30 10:07:55 +02:00
pt3 media: pt3: Switch to using functions pcim_* and devm_* 2021-12-14 15:09:14 +01:00
saa7134 media: saa7134-go7007: get rid of to_state() function 2021-11-29 10:15:04 +01:00
saa7146 media: saa7146: hexium_gemini: Fix a NULL pointer dereference in hexium_attach() 2021-12-14 15:09:14 +01:00
saa7164 media: saa7164: Remove redundant assignment of pointer t 2021-09-30 10:07:59 +02:00
smipcie
solo6x10 media: solo6x10: mark unused functions as such 2021-11-29 13:23:14 +01:00
sta2x11 media updates for v5.13-rc1 2021-04-28 09:24:36 -07:00
ttpci media: ttpci: switch from 'pci_' to 'dma_' API 2021-06-02 13:16:55 +02:00
tw68 media: tw68: switch from 'pci_' to 'dma_' API 2021-04-06 16:07:42 +02:00
tw686x media: tw686x: switch from 'pci_' to 'dma_' API 2021-04-06 16:07:26 +02:00
tw5864 media: tw5864: Disable PCI device when finished 2021-11-15 08:12:01 +00:00
Kconfig
Makefile