Loading
drm/rockchip: vop: fix possible null-ptr-deref in vop_bind()
stable inclusion from stable-v4.19.247 commit 6ff986e057bf28e2f7690dad410768b2270f9453 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBP1K1 CVE: CVE-2022-49491 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6ff986e057bf28e2f7690dad410768b2270f9453 -------------------------------- [ Upstream commit f8c24290 ] It will cause null-ptr-deref in resource_size(), if platform_get_resource() returns NULL, move calling resource_size() after devm_ioremap_resource() that will check 'res' to avoid null-ptr-deref. Fixes: 2048e328 ("drm: rockchip: Add basic drm driver") Signed-off-by:Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20220422032854.2995175-1-yangyingliang@huawei.com Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Cheng Yu <serein.chengyu@huawei.com>