X-Git-Url: https://git.piment-noir.org/?p=deb_xorg-server.git;a=blobdiff_plain;f=debian%2Fpatches%2FCVE-2014-8xxx%2F0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch;fp=debian%2Fpatches%2FCVE-2014-8xxx%2F0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch;h=430e956bee6b6fb9047da7c326f280fc74403d9d;hp=0000000000000000000000000000000000000000;hb=7217e0ca50bba73dad94782e67980aeeb24ab693;hpb=a09e091a5c996d46a398abb27b06fe504591673f diff --git a/debian/patches/CVE-2014-8xxx/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch b/debian/patches/CVE-2014-8xxx/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch new file mode 100644 index 0000000..430e956 --- /dev/null +++ b/debian/patches/CVE-2014-8xxx/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch @@ -0,0 +1,35 @@ +From f07eb544bbcfd9d4c64f036b654f4567f1fd2b9c Mon Sep 17 00:00:00 2001 +From: Alan Coopersmith +Date: Wed, 22 Jan 2014 23:40:18 -0800 +Subject: [PATCH 06/33] dri2: integer overflow in ProcDRI2GetBuffers() + [CVE-2014-8094] + +ProcDRI2GetBuffers() tries to validate a length field (count). +There is an integer overflow in the validation. This can cause +out of bound reads and memory corruption later on. + +Reported-by: Ilja Van Sprundel +Signed-off-by: Alan Coopersmith +Reviewed-by: Peter Hutterer +Reviewed-by: Julien Cristau +--- + hw/xfree86/dri2/dri2ext.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c +index ffd66fa..221ec53 100644 +--- a/hw/xfree86/dri2/dri2ext.c ++++ b/hw/xfree86/dri2/dri2ext.c +@@ -270,6 +270,9 @@ ProcDRI2GetBuffers(ClientPtr client) + unsigned int *attachments; + + REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4); ++ if (stuff->count > (INT_MAX / 4)) ++ return BadLength; ++ + if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, + &pDrawable, &status)) + return status; +-- +1.7.9.2 +