mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 06:18:04 +02:00
unvalidated index in _XkbReadVirtualModMap() [CVE-2013-1997 10/15]
If the X server returns modifier map indexes outside the range of the number of keys it told us to allocate, out of bounds memory writes could occur. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
This commit is contained in:
parent
4d7c422a37
commit
2df882eeb3
1 changed files with 3 additions and 0 deletions
|
|
@ -425,6 +425,9 @@ xkbVModMapWireDesc * wire;
|
|||
XkbServerMapPtr srv;
|
||||
|
||||
if ( rep->totalVModMapKeys>0 ) {
|
||||
if (((int) rep->firstVModMapKey + rep->nVModMapKeys)
|
||||
> xkb->max_key_code)
|
||||
return BadLength;
|
||||
if (((xkb->server==NULL)||(xkb->server->vmodmap==NULL))&&
|
||||
(XkbAllocServerMap(xkb,XkbVirtualModMapMask,0)!=Success)) {
|
||||
return BadAlloc;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue