WSL2-Linux-Kernel/drivers/staging/media
Zhipeng Lu 82c2c85aea media: atomisp: ssh_css: Fix a null-pointer dereference in load_video_binaries
[ Upstream commit 3b621e9e9e148c0928ab109ac3d4b81487469acb ]

The allocation failure of mycs->yuv_scaler_binary in load_video_binaries()
is followed with a dereference of mycs->yuv_scaler_binary after the
following call chain:

sh_css_pipe_load_binaries()
  |-> load_video_binaries(mycs->yuv_scaler_binary == NULL)
  |
  |-> sh_css_pipe_unload_binaries()
        |-> unload_video_binaries()

In unload_video_binaries(), it calls to ia_css_binary_unload with argument
&pipe->pipe_settings.video.yuv_scaler_binary[i], which refers to the
same memory slot as mycs->yuv_scaler_binary. Thus, a null-pointer
dereference is triggered.

Link: https://lore.kernel.org/r/20240118151303.3828292-1-alexious@zju.edu.cn

Fixes: a49d25364d ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-16 13:39:29 +02:00
..
atomisp media: atomisp: ssh_css: Fix a null-pointer dereference in load_video_binaries 2024-06-16 13:39:29 +02:00
av7110 media: dvb: symbol fixup for dvb_attach() 2023-09-19 12:22:51 +02:00
hantro media: staging: media: hantro: Fix typos 2022-08-17 14:23:31 +02:00
imx media: imx: csc/scaler: fix v4l2_ctrl_handler memory leak 2024-03-26 18:21:28 -04:00
ipu3 media: staging: ipu3-imgu: Set fields before media_entity_pads_init() 2024-04-10 16:18:33 +02:00
meson/vdec media: meson: vdec: fix possible refcount leak in vdec_probe() 2022-11-10 18:15:34 +01:00
omap4iss media: Prefer designated initializers over memset for subdev pad ops 2023-05-24 17:36:44 +01:00
rkvdec media: rkvdec: increase max supported height for H.264 2023-09-19 12:22:44 +02:00
sunxi media: cedrus: Fix clock/reset sequence 2023-11-20 11:08:27 +01:00
tegra-vde
tegra-video staging: media: tegra-video: fix device_node use after free 2023-01-12 11:58:55 +01:00
zoran media: staging: media: zoran: fix various V4L2 compliance errors 2022-04-08 14:23:58 +02:00
Kconfig
Makefile