linux/drivers/media/platform/mediatek
Wei Chen 48e4e06e2c media: mediatek: vcodec: Fix potential array out-of-bounds in decoder queue_setup
[ Upstream commit 8fbcf730cb ]

variable *nplanes is provided by user via system call argument. The
possible value of q_data->fmt->num_planes is 1-3, while the value
of *nplanes can be 1-8. The array access by index i can cause array
out-of-bounds.

Fix this bug by checking *nplanes against the array size.

Signed-off-by: Wei Chen <harperchen1110@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:32:36 +01:00
..
jpeg media: platform: fix some double free in meson-ge2d and mtk-jpeg and s5p-mfc 2022-08-30 15:20:49 +02:00
mdp media: platform: mtk-mdp: Fix mdp_ipi_comm structure alignment 2022-07-08 14:48:35 +01:00
mdp3 media: platform: mtk-mdp3: fix potential frame size overflow in mdp_try_fmt_mplane() 2023-05-11 23:03:15 +09:00
vcodec media: mediatek: vcodec: Fix potential array out-of-bounds in decoder queue_setup 2023-05-24 17:32:36 +01:00
vpu media: platform: rename mediatek/mtk-jpeg/ to mediatek/jpeg/ 2022-03-18 05:58:35 +01:00
Kconfig media: platform: mtk-mdp3: add MediaTek MDP3 driver 2022-08-30 16:25:51 +02:00
Makefile media: platform: mtk-mdp3: add MediaTek MDP3 driver 2022-08-30 16:25:51 +02:00