Blame SOURCES/0027-glx-Top-level-length-checking-for-swapped-VendorPriv.patch

0fd959
From 4123cc39c0d1c801f3e41bb5c36dad904cbe5509 Mon Sep 17 00:00:00 2001
0fd959
From: Adam Jackson <ajax@redhat.com>
0fd959
Date: Mon, 10 Nov 2014 12:13:44 -0500
0fd959
Subject: [PATCH 27/33] glx: Top-level length checking for swapped
0fd959
 VendorPrivate requests [CVE-2014-8098 4/8]
0fd959
0fd959
Reviewed-by: Keith Packard <keithp@keithp.com>
0fd959
Reviewed-by: Julien Cristau <jcristau@debian.org>
0fd959
Reviewed-by: Michal Srb <msrb@suse.com>
0fd959
Reviewed-by: Andy Ritger <aritger@nvidia.com>
0fd959
Signed-off-by: Adam Jackson <ajax@redhat.com>
0fd959
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
0fd959
Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
0fd959
---
0fd959
 glx/glxcmdsswap.c | 4 ++++
0fd959
 1 file changed, 4 insertions(+)
0fd959
0fd959
diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
0fd959
index 5d179f3..9ec1222 100644
0fd959
--- a/glx/glxcmdsswap.c
0fd959
+++ b/glx/glxcmdsswap.c
0fd959
@@ -958,11 +958,13 @@ __glXDispSwap_RenderLarge(__GLXclientState * cl, GLbyte * pc)
0fd959
 int
0fd959
 __glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
0fd959
 {
0fd959
+    ClientPtr client = cl->client;
0fd959
     xGLXVendorPrivateReq *req;
0fd959
     GLint vendorcode;
0fd959
     __GLXdispatchVendorPrivProcPtr proc;
0fd959
 
0fd959
     __GLX_DECLARE_SWAP_VARIABLES;
0fd959
+    REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq);
0fd959
 
0fd959
     req = (xGLXVendorPrivateReq *) pc;
0fd959
     __GLX_SWAP_SHORT(&req->length);
0fd959
@@ -985,11 +987,13 @@ __glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
0fd959
 int
0fd959
 __glXDispSwap_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
0fd959
 {
0fd959
+    ClientPtr client = cl->client;
0fd959
     xGLXVendorPrivateWithReplyReq *req;
0fd959
     GLint vendorcode;
0fd959
     __GLXdispatchVendorPrivProcPtr proc;
0fd959
 
0fd959
     __GLX_DECLARE_SWAP_VARIABLES;
0fd959
+    REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateWithReplyReq);
0fd959
 
0fd959
     req = (xGLXVendorPrivateWithReplyReq *) pc;
0fd959
     __GLX_SWAP_SHORT(&req->length);
0fd959
-- 
0fd959
1.9.3
0fd959