[PATCH] drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read

2019-05-20 Thread Murray McAllister
If SVGA_3D_CMD_DX_SET_SHADER is called with a shader ID of SVGA3D_INVALID_ID, and a shader type of SVGA3D_SHADERTYPE_INVALID, the calculated binding.shader_slot will be 4294967295, leading to an out-of-bounds read in vmw_binding_loc() when the offset is calculated. Signed-off-by: Murray

[PATCH] drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define()

2019-05-10 Thread Murray McAllister
If SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW is called with a surface ID of SVGA3D_INVALID_ID, the srf struct will remain NULL after vmw_cmd_res_check(), leading to a null pointer dereference in vmw_view_add(). Signed-off-by: Murray McAllister --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 4