drm/radeon: fix a possible null pointer dereference
mainline inclusion from mainline-v5.19-rc1 commit a2b28708 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9R4KL CVE: CVE-2022-48710 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a2b28708b645c5632dc93669ab06e97874c8244f -------------------------------- In radeon_fp_native_mode(), the return value of drm_mode_duplicate() is assigned to mode, which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Add a check to avoid npd. The failure status of drm_cvt_mode() on the other path is checked too. Signed-off-by:Gong Yuanjun <ruc_gongyuanjun@163.com> Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Signed-off-by:
Liu Chuang <liuchuang40@huawei.com>
Loading
Please sign in to comment