summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xen/xen_drm_front_conn.h
diff options
context:
space:
mode:
authorLv Yunlong <lyl2019@mail.ustc.edu.cn>2021-03-23 04:46:56 +0300
committerOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>2021-03-26 08:40:03 +0300
commit52762efa2b256ed1c5274e5177cbd52ee11a2f6a (patch)
tree3487d388c1c06ab4ccc8c61ee04b727520c9f335 /drivers/gpu/drm/xen/xen_drm_front_conn.h
parent50891bead80bc79871528c2962d65c781c02330b (diff)
downloadlinux-52762efa2b256ed1c5274e5177cbd52ee11a2f6a.tar.xz
gpu/xen: Fix a use after free in xen_drm_drv_init
In function displback_changed, has the call chain displback_connect(front_info)->xen_drm_drv_init(front_info). We can see that drm_info is assigned to front_info->drm_info and drm_info is freed in fail branch in xen_drm_drv_init(). Later displback_disconnect(front_info) is called and it calls xen_drm_drv_fini(front_info) cause a use after free by drm_info = front_info->drm_info statement. My patch has done two things. First fixes the fail label which drm_info = kzalloc() failed and still free the drm_info. Second sets front_info->drm_info to NULL to avoid uaf. Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210323014656.10068-1-lyl2019@mail.ustc.edu.cn
Diffstat (limited to 'drivers/gpu/drm/xen/xen_drm_front_conn.h')
0 files changed, 0 insertions, 0 deletions