Skip to content
Commit c38c6cc6 authored by Yi Yang's avatar Yi Yang
Browse files

tty: vcc: Add check for kstrdup() in vcc_probe()

stable inclusion
from stable-v4.19.300
commit 909963e0c16778cec28efb1affc21558825f4200
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RFK8
CVE: CVE-2023-52789

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



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

[ Upstream commit d81ffb87aaa75f842cd7aa57091810353755b3e6 ]

Add check for the return value of kstrdup() and return the error, if it
fails in order to avoid NULL pointer dereference.

Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
Reviewed-by: default avatarJiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230904035220.48164-1-yiyang13@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
parent d2901c3f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment