|
|
0fd959 |
From 7cadf50d0b2f036ddaf9d4d93405fd68bbe53f2a Mon Sep 17 00:00:00 2001
|
|
|
0fd959 |
From: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
0fd959 |
Date: Wed, 22 Jan 2014 23:40:18 -0800
|
|
|
0fd959 |
Subject: [PATCH 06/33] dri2: integer overflow in ProcDRI2GetBuffers()
|
|
|
0fd959 |
[CVE-2014-8094]
|
|
|
0fd959 |
|
|
|
0fd959 |
ProcDRI2GetBuffers() tries to validate a length field (count).
|
|
|
0fd959 |
There is an integer overflow in the validation. This can cause
|
|
|
0fd959 |
out of bound reads and memory corruption later on.
|
|
|
0fd959 |
|
|
|
0fd959 |
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
|
|
|
0fd959 |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
0fd959 |
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
0fd959 |
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
|
0fd959 |
Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
|
|
|
0fd959 |
---
|
|
|
0fd959 |
hw/xfree86/dri2/dri2ext.c | 3 +++
|
|
|
0fd959 |
1 file changed, 3 insertions(+)
|
|
|
0fd959 |
|
|
|
0fd959 |
diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c
|
|
|
0fd959 |
index b858213..b70624e 100644
|
|
|
0fd959 |
--- a/hw/xfree86/dri2/dri2ext.c
|
|
|
0fd959 |
+++ b/hw/xfree86/dri2/dri2ext.c
|
|
|
0fd959 |
@@ -281,6 +281,9 @@ ProcDRI2GetBuffers(ClientPtr client)
|
|
|
0fd959 |
unsigned int *attachments;
|
|
|
0fd959 |
|
|
|
0fd959 |
REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4);
|
|
|
0fd959 |
+ if (stuff->count > (INT_MAX / 4))
|
|
|
0fd959 |
+ return BadLength;
|
|
|
0fd959 |
+
|
|
|
0fd959 |
if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess,
|
|
|
0fd959 |
&pDrawable, &status))
|
|
|
0fd959 |
return status;
|
|
|
0fd959 |
--
|
|
|
0fd959 |
1.9.3
|
|
|
0fd959 |
|