diff options
| author | Lv Yunlong <[email protected]> | 2021-03-22 18:46:56 -0700 |
|---|---|---|
| committer | Oleksandr Andrushchenko <[email protected]> | 2021-03-26 07:40:03 +0200 |
| commit | 52762efa2b256ed1c5274e5177cbd52ee11a2f6a (patch) | |
| tree | 3487d388c1c06ab4ccc8c61ee04b727520c9f335 /drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | |
| parent | 50891bead80bc79871528c2962d65c781c02330b (diff) | |
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 <[email protected]>
Reviewed-by: Oleksandr Andrushchenko <[email protected]>
Signed-off-by: Oleksandr Andrushchenko <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c')
0 files changed, 0 insertions, 0 deletions