]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read
authorMurray McAllister <murray.mcallister@gmail.com>
Mon, 20 May 2019 09:57:34 +0000 (21:57 +1200)
committerThomas Hellstrom <thellstrom@vmware.com>
Tue, 21 May 2019 08:23:10 +0000 (10:23 +0200)
commit2ccf83dacc132a7f3d413aeaf03ea4930d87de82
treec12fa8f05a0593051fa54565fced2f63c6af22dd
parent300344f960daa6e75899cbe9b0f4e3076f06241b
drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read

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.

Cc: <stable@vger.kernel.org>
Fixes: 37aa331a817d ("drm/vmwgfx: Initial DX support")
Signed-off-by: Murray McAllister <murray.mcallister@gmail.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c