linux-brain/drivers/media/pci/ttpci
Jia-Ju Bai fc93c091de media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA value in debiirq()
[ Upstream commit 6499a0db9b0f1e903d52f8244eacc1d4be00eea2 ]

The value av7110->debi_virt is stored in DMA memory, and it is assigned
to data, and thus data[0] can be modified at any time by malicious
hardware. In this case, "if (data[0] < 2)" can be passed, but then
data[0] can be changed into a large number, which may cause buffer
overflow when the code "av7110->ci_slot[data[0]]" is used.

To fix this possible bug, data[0] is assigned to a local variable, which
replaces the use of data[0].

Signed-off-by: Jia-Ju Bai <baijiaju@tsinghua.edu.cn>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:26:42 +02:00
..
Kconfig media: ttpci: Fix build error without RC_CORE 2019-06-21 15:33:32 -04:00
Makefile media: prefix header search paths with $(srctree)/ 2019-05-18 11:49:56 +09:00
av7110.c media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA value in debiirq() 2020-09-03 11:26:42 +02:00
av7110.h media: ttpci: use rc-core for the IR receiver 2019-06-10 15:03:33 -04:00
av7110_av.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 113 2019-05-24 17:39:01 +02:00
av7110_av.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
av7110_ca.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 113 2019-05-24 17:39:01 +02:00
av7110_ca.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
av7110_hw.c media: remove include stdarg.h from some drivers 2019-08-26 14:01:44 -03:00
av7110_hw.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
av7110_ipack.c treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
av7110_ipack.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
av7110_ir.c media: ttpci: unknown protocol is rc-mm-32 2019-08-21 18:39:54 -03:00
av7110_v4l.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 113 2019-05-24 17:39:01 +02:00
budget-av.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 113 2019-05-24 17:39:01 +02:00
budget-ci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 113 2019-05-24 17:39:01 +02:00
budget-core.c media: budget-core: Improve exception handling in budget_register() 2020-08-26 10:40:54 +02:00
budget-patch.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 113 2019-05-24 17:39:01 +02:00
budget.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 113 2019-05-24 17:39:01 +02:00
budget.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
dvb_filter.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dvb_filter.h media: move dvb kAPI headers to include/media 2017-12-28 13:16:01 -05:00
ttpci-eeprom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
ttpci-eeprom.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00