Commit 505b0b4a authored by Kunwu Chan's avatar Kunwu Chan Committed by Yuntao Liu
Browse files

x86/xen: Add some null pointer checking to smp.c

stable inclusion
from stable-v5.10.214
commit eb279074badac0bbe28749906562d648ca4bc750
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9HK0E
CVE: CVE-2024-26908

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



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

[ Upstream commit 3693bb4465e6e32a204a5b86d3ec7e6b9f7e67c2 ]

kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure. Ensure the allocation was successful
by checking the pointer validity.
confilct:
	arch/x86/xen/smp.c

Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401161119.iof6BQsf-lkp@intel.com/


Suggested-by: default avatarMarkus Elfring <Markus.Elfring@web.de>
Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20240119094948.275390-1-chentao@kylinos.cn


Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYuntao Liu <liuyuntao12@huawei.com>
parent cc163ca2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment