2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-10 06:34:17 +08:00
linux-next/drivers/media/platform/mediatek
Wei Chen e7f2e65699 media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
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.

Fixes: 4e855a6efa ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver")
Signed-off-by: Wei Chen <harperchen1110@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-08-23 09:56:08 +02:00
..
jpeg media: mtk-jpeg: Set platform driver data earlier 2023-07-28 10:19:11 +02:00
mdp media: mtk_mdp_core: Convert to platform remove callback returning void 2023-04-11 16:59:15 +02:00
mdp3 media: platform: mtk-mdp3: release node reference before returning 2023-05-25 16:21:19 +02:00
vcodec media: vcodec: Fix potential array out-of-bounds in encoder queue_setup 2023-08-23 09:56:08 +02:00
vpu media: mediatek: vpu: add missing clk_unprepare 2023-06-09 16:08:53 +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