linux-stable/drivers/staging
Zhipeng Lu 6482c43386 media: atomisp: ssh_css: Fix a null-pointer dereference in load_video_binaries
[ Upstream commit 3b621e9e9e ]

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-05-30 09:44:49 +02:00
..
axis-fifo
fbtft Staging driver cleanups for 6.9-rc1 2024-03-21 13:03:44 -07:00
fieldbus Staging driver cleanups for 6.9-rc1 2024-03-21 13:03:44 -07:00
gdm724x
greybus Staging driver cleanups for 6.9-rc1 2024-03-21 13:03:44 -07:00
iio
ks7010
media media: atomisp: ssh_css: Fix a null-pointer dereference in load_video_binaries 2024-05-30 09:44:49 +02:00
most
nvec
octeon
olpc_dcon
pi433
rtl8192e
rtl8712
rtl8723bs
rts5208
sm750fb
vc04_services staging: vc04_services: fix information leak in create_component() 2024-03-25 19:10:01 +01:00
vme_user
vt6655 Staging driver cleanups for 6.9-rc1 2024-03-21 13:03:44 -07:00
vt6656
wlan-ng
Kconfig
Makefile