[PATCH] gpu: drm: vmwgfx: fix information leak to userland

Thomas Hellstrom thellstrom at vmware.com
Mon Nov 8 07:40:59 PST 2010


On 11/06/2010 03:41 PM, Vasiliy Kulikov wrote:
> Structure drm_vmw_fence_rep is copied to userland with field "pad64"
> uninitialized.  It leads to leaking of contents of kernel stack memory.
>
> Signed-off-by: Vasiliy Kulikov<segooon at gmail.com>
> ---
>   Compile tested.
>
>   drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> index 51d9f9f..76954e3 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> @@ -691,6 +691,7 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
>
>   	fence_rep.error = ret;
>   	fence_rep.fence_seq = (uint64_t) sequence;
> +	fence_rep.pad64 = 0;
>
>   	user_fence_rep = (struct drm_vmw_fence_rep __user *)
>   	    (unsigned long)arg->fence_rep;
>    
Reviewed-by: Thomas Hellstrom <thellstrom at vmware.com>



More information about the dri-devel mailing list