diff options
| author | Zack Rusin <[email protected]> | 2024-01-10 20:03:05 +0000 |
|---|---|---|
| committer | Zack Rusin <[email protected]> | 2024-01-26 18:48:06 +0000 |
| commit | 517621b7060096e48e42f545fa6646fc00252eac (patch) | |
| tree | c4724f2cd5883d83de739fbaf0ba7881a4918980 /drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | |
| parent | drm/vmwgfx: Add SVGA_3D_CMD_DEFINE_GB_SURFACE_V4 to command array. (diff) | |
| download | kernel-517621b7060096e48e42f545fa6646fc00252eac.tar.gz kernel-517621b7060096e48e42f545fa6646fc00252eac.zip | |
drm/vmwgfx: Fix possible null pointer derefence with invalid contexts
vmw_context_cotable can return either an error or a null pointer and its
usage sometimes went unchecked. Subsequent code would then try to access
either a null pointer or an error value.
The invalid dereferences were only possible with malformed userspace
apps which never properly initialized the rendering contexts.
Check the results of vmw_context_cotable to fix the invalid derefs.
Thanks:
ziming zhang(@ezrak1e) from Ant Group Light-Year Security Lab
who was the first person to discover it.
Niels De Graef who reported it and helped to track down the poc.
Fixes: 9c079b8ce8bf ("drm/vmwgfx: Adapt execbuf to the new validation api")
Cc: <[email protected]> # v4.20+
Reported-by: Niels De Graef <[email protected]>
Signed-off-by: Zack Rusin <[email protected]>
Cc: Martin Krastev <[email protected]>
Cc: Maaz Mombasawala <[email protected]>
Cc: Ian Forbes <[email protected]>
Cc: Broadcom internal kernel review list <[email protected]>
Cc: [email protected]
Reviewed-by: Maaz Mombasawala <[email protected]>
Reviewed-by: Martin Krastev <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c')
0 files changed, 0 insertions, 0 deletions
