xserver/xkb
Matthieu Herrb 07a0acd246 xkb: Fix buffer overflow in _XkbSetCompatMap()
The _XkbSetCompatMap() function attempts to resize the `sym_interpret`
buffer.

However, It didn't update its size properly. It updated `num_si` only,
without updating `size_si`.

This may lead to local privilege escalation if the server is run as root
or remote code execution (e.g. x11 over ssh).

CVE-2024-9632, ZDI-CAN-24756

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1733>
2024-10-31 16:24:41 +01:00
..
README.compiled R6.6 is the Xorg base-line 2003-11-14 15:54:54 +00:00
XKBAlloc.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
XKBGAlloc.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
XKBMAlloc.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
XKBMisc.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
XKM_file_format.txt Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
ddxBeep.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
ddxCtrls.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
ddxKillSrv.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
ddxLEDs.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
ddxLoad.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
ddxPrivate.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
ddxVT.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
maprules.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
meson.build Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
xkb-procs.h xkb: rename xkb.h to xkb-procs.h 2022-07-08 14:27:04 +00:00
xkb.c xkb: Fix buffer overflow in _XkbSetCompatMap() 2024-10-31 16:24:41 +01:00
xkbAccessX.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
xkbActions.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
xkbDflts.h Use ARRAY_SIZE all over the tree 2017-10-30 13:45:20 -04:00
xkbEvents.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
xkbInit.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
xkbLEDs.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
xkbPrKeyEv.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
xkbSwap.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
xkbUtils.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00
xkbfmisc.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
xkbgeom.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xkbout.c (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H 2024-09-18 17:23:11 +02:00
xkbsrv_priv.h include: move private defs to dixstruct_priv.h 2024-04-30 00:47:38 +00:00
xkbtext.c (submit/fix-char-signedness) xkb: xkbtext: fix char signess mismatch 2024-09-18 17:23:12 +02:00
xkbtext_priv.h xkb: unexport Xkb* defines used by xkbtext.c 2024-05-14 03:57:45 +00:00
xkmread.c (!1688) os: unexport internal logging functions 2024-09-18 17:23:12 +02:00

The X server uses this directory to store the compiled version of the
current keymap and/or any scratch keymaps used by clients.  The X server
or some other tool might destroy or replace the files in this directory,
so it is not a safe place to store compiled keymaps for long periods of
time.  The default keymap for any server is usually stored in:
     X<num>-default.xkm
where <num> is the display number of the server in question, which makes
it possible for several servers *on the same host* to share the same 
directory.

Unless the X server is modified, sharing this directory between servers on
different hosts could cause problems.