mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 05:08:03 +02:00
unvalidated index in _XkbReadKeyActions() [CVE-2013-1997 6/15]
If the X server returns key action indexes outside the range of the number of keys it told us to allocate, out of bounds memory access 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
fd7d4956bc
commit
00626c3830
1 changed files with 4 additions and 0 deletions
|
|
@ -269,6 +269,10 @@ Status ret = Success;
|
|||
symMap = &info->map->key_sym_map[rep->firstKeyAct];
|
||||
for (i=0;i<(int)rep->nKeyActs;i++,symMap++) {
|
||||
if (numDesc[i]==0) {
|
||||
if ((i + rep->firstKeyAct) > (info->max_key_code + 1)) {
|
||||
ret = BadLength;
|
||||
goto done;
|
||||
}
|
||||
info->server->key_acts[i+rep->firstKeyAct]= 0;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue