Commit 2cbc996b authored by Aleksandr Mishin's avatar Aleksandr Mishin Committed by Ze Zuo
Browse files

drm: vc4: Fix possible null pointer dereference

stable inclusion
from stable-v5.10.219
commit 2d9adecc88ab678785b581ab021f039372c324cb
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA6SGI
CVE: CVE-2024-38546

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2d9adecc88ab678785b581ab021f039372c324cb



--------------------------------

[ Upstream commit c534b63bede6cb987c2946ed4d0b0013a52c5ba7 ]

In vc4_hdmi_audio_init() of_get_address() may return
NULL which is later dereferenced. Fix this bug by adding NULL check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: bb7d7856 ("drm/vc4: Add HDMI audio support")
Signed-off-by: default avatarAleksandr Mishin <amishin@t-argos.ru>
Signed-off-by: default avatarMaxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240409075622.11783-1-amishin@t-argos.ru


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>

Conflicts:
	drivers/gpu/drm/vc4/vc4_hdmi.c
[Fix context]
Signed-off-by: default avatarZe Zuo <zuoze1@huawei.com>
parent 552503ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment