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:Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210831084236.1359677-1-yangyingliang@huawei.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Wenyu Huang <huangwenyu5@huawei.com>
Loading
Please sign in to comment