mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 02:10:35 +01:00
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 <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
(cherry picked from commit 6692670fde)
Signed-off-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
parent
2883994f9f
commit
db386cd6a1
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue