X-Git-Url: https://git.piment-noir.org/?p=deb_xorg-server.git;a=blobdiff_plain;f=debian%2Fpatches%2FCVE-2014-8xxx%2F0033-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch;fp=debian%2Fpatches%2FCVE-2014-8xxx%2F0033-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch;h=b004cac62a07eee836365132c759dd172cc0cbbf;hp=0000000000000000000000000000000000000000;hb=7217e0ca50bba73dad94782e67980aeeb24ab693;hpb=a09e091a5c996d46a398abb27b06fe504591673f diff --git a/debian/patches/CVE-2014-8xxx/0033-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch b/debian/patches/CVE-2014-8xxx/0033-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch new file mode 100644 index 0000000..b004cac --- /dev/null +++ b/debian/patches/CVE-2014-8xxx/0033-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch @@ -0,0 +1,34 @@ +From a7c63d6599067dc8ff0d114536d2db3fadb4e195 Mon Sep 17 00:00:00 2001 +From: Robert Morell +Date: Wed, 12 Nov 2014 18:51:43 -0800 +Subject: [PATCH 33/33] glx: Fix mask truncation in __glXGetAnswerBuffer + [CVE-2014-8093 6/6] + +On a system where sizeof(unsigned) != sizeof(intptr_t), the unary +bitwise not operation will result in a mask that clears all high bits +from temp_buf in the expression: + temp_buf = (temp_buf + mask) & ~mask; + +Signed-off-by: Robert Morell +Reviewed-by: Alan Coopersmith +Signed-off-by: Alan Coopersmith +--- + glx/indirect_util.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/glx/indirect_util.c b/glx/indirect_util.c +index de81491..9ba2815 100644 +--- a/glx/indirect_util.c ++++ b/glx/indirect_util.c +@@ -73,7 +73,7 @@ __glXGetAnswerBuffer(__GLXclientState * cl, size_t required_size, + void *local_buffer, size_t local_size, unsigned alignment) + { + void *buffer = local_buffer; +- const unsigned mask = alignment - 1; ++ const intptr_t mask = alignment - 1; + + if (local_size < required_size) { + size_t worst_case_size; +-- +1.7.9.2 +