[X2Go-Commits] [nx-libs] 45/52: glx: Additional paranoia in __glXGetAnswerBuffer / __GLX_GET_ANSWER_BUFFER (v2) [CVE-2014-8093 3/6]
git-admin at x2go.org
git-admin at x2go.org
Sat Feb 14 17:47:17 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit d0fcbc8a6ca82df82c410d0f8f9062b05fa5ec8d
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Nov 10 12:13:38 2014 -0500
glx: Additional paranoia in __glXGetAnswerBuffer / __GLX_GET_ANSWER_BUFFER (v2) [CVE-2014-8093 3/6]
If the computed reply size is negative, something went wrong, treat it
as an error.
v2: Be more careful about size_t being unsigned (Matthieu Herrb)
v3: SIZE_MAX not SIZE_T_MAX (Alan Coopersmith)
v4: backport to nx-libs 3.6.x (Mike DePaulo)
Reviewed-by: Julien Cristau <jcristau at debian.org>
Reviewed-by: Michal Srb <msrb at suse.com>
Reviewed-by: Andy Ritger <aritger at nvidia.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Fedora X Ninjas <x at fedoraproject.org>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
nx-X11/programs/Xserver/GL/glx/unpack.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/nx-X11/programs/Xserver/GL/glx/unpack.h b/nx-X11/programs/Xserver/GL/glx/unpack.h
index 723fb85..94bdae8 100644
--- a/nx-X11/programs/Xserver/GL/glx/unpack.h
+++ b/nx-X11/programs/Xserver/GL/glx/unpack.h
@@ -89,7 +89,8 @@ extern xGLXSingleReply __glXReply;
** pointer.
*/
#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
- if ((size) > sizeof(answerBuffer)) { \
+ if (size < 0) return BadLength; \
+ else if ((size) > sizeof(answerBuffer)) { \
int bump; \
if ((cl)->returnBufSize < (size)+(align)) { \
(cl)->returnBuf = (GLbyte*)Xrealloc((cl)->returnBuf, \
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list