kernel_samsung_a53x/drivers/media/platform
Vikash Garodia 1d23806f8f media: venus: hfi_parser: Add check to keep the number of codecs within range
commit 0768a9dd809ef52440b5df7dce5a1c1c7e97abbd upstream.

Supported codec bitmask is populated from the payload from venus firmware.
There is a possible case when all the bits in the codec bitmask is set. In
such case, core cap for decoder is filled  and MAX_CODEC_NUM is utilized.
Now while filling the caps for encoder, it can lead to access the caps
array beyong 32 index. Hence leading to OOB write.
The fix counts the supported encoder and decoder. If the count is more than
max, then it skips accessing the caps.

Cc: stable@vger.kernel.org
Fixes: 1a73374a04e5 ("media: venus: hfi_parser: add common capability parser")
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 11:43:31 +01:00
..
am437x Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cadence Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
coda Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
davinci Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos mfc: Reduce QoS boosting from Samsung hacks 2024-11-17 17:43:58 +01:00
exynos-gsc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos4-is Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
marvell-ccic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk-jpeg media: mtk-jpeg: Fix use after free bug due to uncanceled work 2024-11-08 11:25:47 +01:00
mtk-mdp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk-vcodec Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk-vpu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap3isp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom media: venus: hfi_parser: Add check to keep the number of codecs within range 2024-11-18 11:43:31 +01:00
rcar-vin Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rockchip/rga Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s3c-camif media: s3c-camif: Avoid inappropriate kfree() 2024-11-18 11:43:07 +01:00
s5p-g2d Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s5p-jpeg Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s5p-mfc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunxi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-vpe Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vsp1 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aspeed-video.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl-viu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-pxp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-pxp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
m2m-deinterlace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mx2_emmaprp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa_camera.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcar-fcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcar_drif.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcar_fdp1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcar_jpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
renesas-ceu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh_vou.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-camera.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via-camera.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
video-mux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00