[X2Go-Commits] [nx-libs] 34/52: dix: integer overflow in REQUEST_FIXED_SIZE() [CVE-2014-8092 4/4]

git-admin at x2go.org git-admin at x2go.org
Sat Feb 14 17:47:13 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 82d7279ebfa04f319e68145b3adbf65716e59584
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Wed Jan 22 23:44:46 2014 -0800

    dix: integer overflow in REQUEST_FIXED_SIZE() [CVE-2014-8092 4/4]
    
    Force use of 64-bit integers when evaluating data provided by clients
    in 32-bit fields which can overflow when added or multiplied during
    checks.
    
    Reported-by: Ilja Van Sprundel <ivansprundel at ioactive.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
    
    RHEL5: add #include <stdint.h> for uint64_t
    v3: backport to nx-libs 3.6.x (Mike DePaulo)
---
 nx-X11/programs/Xserver/include/dix.h |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/nx-X11/programs/Xserver/include/dix.h b/nx-X11/programs/Xserver/include/dix.h
index 1b8fc42..d82979c 100644
--- a/nx-X11/programs/Xserver/include/dix.h
+++ b/nx-X11/programs/Xserver/include/dix.h
@@ -50,6 +50,8 @@ SOFTWARE.
 #ifndef DIX_H
 #define DIX_H
 
+#include <stdint.h>
+
 #include "gc.h"
 #include "window.h"
 #include "input.h"
@@ -73,7 +75,8 @@ SOFTWARE.
 
 #define REQUEST_FIXED_SIZE(req, n)\
     if (((sizeof(req) >> 2) > client->req_len) || \
-        (((sizeof(req) + (n) + 3) >> 2) != client->req_len)) \
+        ((n >> 2) >= client->req_len) || \
+        ((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len))  \
          return(BadLength)
 
 #define LEGAL_NEW_RESOURCE(id,client)\

--
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