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>
This commit is contained in:
parent
e0e1164462
commit
6692670fde
|
@ -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…
Reference in New Issue