ODROID-U3 xorg-server debian package fork :
[deb_xorg-server.git] / debian / patches / CVE-2014-8xxx / 0028-glx-Top-level-length-checking-for-swapped-VendorPriv.patch
CommitLineData
7217e0ca
ML
1From efb3efd096edba7551e4e0e40bea522651211303 Mon Sep 17 00:00:00 2001
2From: Adam Jackson <ajax@redhat.com>
3Date: Mon, 10 Nov 2014 12:13:44 -0500
4Subject: [PATCH 28/33] glx: Top-level length checking for swapped
5 VendorPrivate requests [CVE-2014-8098 4/8]
6
7Reviewed-by: Keith Packard <keithp@keithp.com>
8Reviewed-by: Julien Cristau <jcristau@debian.org>
9Reviewed-by: Michal Srb <msrb@suse.com>
10Reviewed-by: Andy Ritger <aritger@nvidia.com>
11Signed-off-by: Adam Jackson <ajax@redhat.com>
12Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13---
14 glx/glxcmdsswap.c | 4 ++++
15 1 file changed, 4 insertions(+)
16
7217e0ca
ML
17--- a/glx/glxcmdsswap.c
18+++ b/glx/glxcmdsswap.c
4db25562 19@@ -958,11 +958,13 @@ __glXDispSwap_RenderLarge(__GLXclientSta
7217e0ca
ML
20 int
21 __glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc)
22 {
23+ ClientPtr client = cl->client;
24 xGLXVendorPrivateReq *req;
25 GLint vendorcode;
26 __GLXdispatchVendorPrivProcPtr proc;
27
28 __GLX_DECLARE_SWAP_VARIABLES;
29+ REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq);
30
31 req = (xGLXVendorPrivateReq *) pc;
32 __GLX_SWAP_SHORT(&req->length);
4db25562 33@@ -985,11 +987,13 @@ __glXDispSwap_VendorPrivate(__GLXclientS
7217e0ca
ML
34 int
35 __glXDispSwap_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
36 {
37+ ClientPtr client = cl->client;
38 xGLXVendorPrivateWithReplyReq *req;
39 GLint vendorcode;
40 __GLXdispatchVendorPrivProcPtr proc;
41
42 __GLX_DECLARE_SWAP_VARIABLES;
43+ REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateWithReplyReq);
44
45 req = (xGLXVendorPrivateWithReplyReq *) pc;
46 __GLX_SWAP_SHORT(&req->length);