public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] vmwgfx: information leak in vmw_execbuf_copy_fence_user()
@ 2011-10-18  6:10 Dan Carpenter
  2011-10-18  6:38 ` Thomas Hellstrom
  2011-10-18  9:30 ` [patch] vmwgfx: information leak in Vasiliy Kulikov
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2011-10-18  6:10 UTC (permalink / raw)
  To: David Airlie
  Cc: Thomas Hellstrom, kernel-janitors, Vasiliy Kulikov, dri-devel,
	Jerome Glisse, Dave Airlie

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>

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index d4a1d8b..28e1c35 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-18  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18  6:10 [patch] vmwgfx: information leak in vmw_execbuf_copy_fence_user() Dan Carpenter
2011-10-18  6:38 ` Thomas Hellstrom
2011-10-18  9:30 ` [patch] vmwgfx: information leak in Vasiliy Kulikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox