Commit 3084ceb1 authored by Huai-Yuan Liu's avatar Huai-Yuan Liu Committed by Chen Zhongjin
Browse files

drm/arm/malidp: fix a possible null pointer dereference

stable inclusion
from stable-v4.19.316
commit b6cc5dd06336ed8bb3a7a1fc5aaf7d5e88bc0818
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9T5PA
CVE: CVE-2024-36014

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



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

[ Upstream commit a1f95aede6285dba6dd036d907196f35ae3a11ea ]

In malidp_mw_connector_reset, new memory is allocated with kzalloc, but
no check is performed. In order to prevent null pointer dereferencing,
ensure that mw_state is checked before calling
__drm_atomic_helper_connector_reset.

Fixes: 8cbc5caf ("drm: mali-dp: Add writeback connector")
Signed-off-by: default avatarHuai-Yuan Liu <qq810974084@gmail.com>
Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240407063053.5481-1-qq810974084@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Zhongjin <chenzhongjin@huawei.com>
parent b01db796
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment