Skip to content
Commit 0d9cac0c authored by Dan Carpenter's avatar Dan Carpenter Committed by Thomas Hellstrom
Browse files

drm/vmwgfx: Potential off by one in vmw_view_add()

The vmw_view_cmd_to_type() function returns vmw_view_max (3) on error.
It's one element beyond the end of the vmw_view_cotables[] table.

My read on this is that it's possible to hit this failure.  header->id
comes from vmw_cmd_check() and it's a user controlled number between
1040 and 1225 so we can hit that error.  But I don't have the hardware
to test this code.

Fixes: d80efd5c

 ("drm/vmwgfx: Initial DX support")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Cc: <stable@vger.kernel.org>
parent 98648ae6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment