Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / CVE-2014-8xxx / 0030-glx-Length-checking-for-non-generated-vendor-private.patch
CommitLineData
7217e0ca
ML
1From 475a39f6ac52aa2dc1babfece38d73da1a478731 Mon Sep 17 00:00:00 2001
2From: Adam Jackson <ajax@redhat.com>
3Date: Mon, 10 Nov 2014 12:13:46 -0500
4Subject: [PATCH 30/33] glx: Length-checking for non-generated vendor private
5 requests [CVE-2014-8098 6/8]
6
7Reviewed-by: Keith Packard <keithp@keithp.com>
8Reviewed-by: Michal Srb <msrb@suse.com>
9Reviewed-by: Andy Ritger <aritger@nvidia.com>
10Signed-off-by: Adam Jackson <ajax@redhat.com>
11Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12---
13 glx/indirect_program.c | 2 ++
14 glx/swap_interval.c | 2 ++
15 2 files changed, 4 insertions(+)
16
17diff --git a/glx/indirect_program.c b/glx/indirect_program.c
18index cda139e..5caee7b 100644
19--- a/glx/indirect_program.c
20+++ b/glx/indirect_program.c
21@@ -56,6 +56,8 @@ DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc,
22 __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error);
23 ClientPtr client = cl->client;
24
25+ REQUEST_FIXED_SIZE(xGLXVendorPrivateWithReplyReq, 8);
26+
27 pc += __GLX_VENDPRIV_HDR_SIZE;
28 if (cx != NULL) {
29 GLenum target;
30diff --git a/glx/swap_interval.c b/glx/swap_interval.c
31index 17bc992..2320550 100644
32--- a/glx/swap_interval.c
33+++ b/glx/swap_interval.c
34@@ -46,6 +46,8 @@ DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap)
35 __GLXcontext *cx;
36 GLint interval;
37
38+ REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 4);
39+
40 cx = __glXLookupContextByTag(cl, tag);
41
42 if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
43--
441.7.9.2
45