Commit 4c19cd0c authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

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: 's avatarIlja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: 's avatarMatthieu Herrb <matthieu.herrb@laas.fr> Signed-off-by: 's avatarJulien Cristau <jcristau@debian.org> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 5dae1d3f
......@@ -270,6 +270,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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment