Skip to content
Commit b4a087e9 authored by Yang Yingliang's avatar Yang Yingliang Committed by Wenyu Huang
Browse files

usb: dwc2: check return value after calling platform_get_resource()

stable inclusion
from stable-v4.19.315
commit a7182993dd8e09f96839ddc3ac54f9b37370d282
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4OY
CVE: CVE-2021-47409

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.19.315&id=a7182993dd8e09f96839ddc3ac54f9b37370d282



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

[ Upstream commit 856e6e8e ]

It will cause null-ptr-deref if platform_get_resource() returns NULL,
we need check the return value.

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210831084236.1359677-1-yangyingliang@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 avatarWenyu Huang <huangwenyu5@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