Skip to content

Commit

Permalink
vmwgfx: information leak in vmw_execbuf_copy_fence_user()
Browse files Browse the repository at this point in the history
If ret is non-zero then we don't initialize the struct which leaks
stack information to user space.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dan Carpenter authored and Dave Airlie committed Oct 18, 2011
1 parent 0c5d370 commit 80d9b24
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,8 @@ vmw_execbuf_copy_fence_user(struct vmw_private *dev_priv,
if (user_fence_rep == NULL)
return;

memset(&fence_rep, 0, sizeof(fence_rep));

fence_rep.error = ret;
if (ret == 0) {
BUG_ON(fence == NULL);
Expand Down

0 comments on commit 80d9b24

Please sign in to comment.