xserver/Xext
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jeremy Huddleston Sequoia d8cee7e08b xkb: Guard XkbAdjustGroup() against a keymap with no groups
When every key in a keymap has zero groups, ctrls->num_groups is 0 and each out-of-range action here misbehaves.
XkbWrapIntoRange divides by zero, which is the reported crash.  XkbClampIntoRange is worse: it computes -1,
returns it through this function's unsigned type, and the callers truncate it into XkbStateRec's unsigned char
group fields as 255, after which XkbComputeCompatState() reads map->groups[255] out of a four element array and
reports what it finds to clients in the compat state of every core event.  The negative-group case adds zero
forever, wedging the server thread, in one path while it holds input_lock.  XkbComputeDerivedState() treats group
0 as out of range once num_groups is 0, so all of this is reachable from an ordinary key event.

XQuartz gets there because it asks for model "empty", whose keycodes file declares no key names, so a keymap
compiled at a client's request has no key definitions at all.

Guard the arithmetic itself and not just the places that compute num_groups: groups_wrap selects between these
actions and is client settable, and this is exported for DDXes that supply their own controls.

Fixes: https://github.com/XQuartz/XQuartz/issues/422
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2278>
(cherry picked from commit bdb14dce4b)
(cherry picked from commit b5ea5591d1f514d0eb0cc5f58052a24fd1b06b9e)
(cherry picked from commit eb420bff03b4ae05d00821482c9fcfaf32a2922d)
2026-10-01 19:01:38 +02:00
..
bigreq Xext: bigreq: move it into it's own subdir 2026-06-18 13:07:15 +02:00
composite xext: composite: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:24:07 +02:00
damage license: add X11 OR MIT OR AGPL-3.0-or-later to Enrico Weigelt's source files 2026-07-29 10:02:59 +02:00
doublebuffer license: add X11 OR MIT OR AGPL-3.0-or-later to Enrico Weigelt's source files 2026-07-29 10:02:59 +02:00
dpms license: add X11 OR MIT OR AGPL-3.0-or-later to Enrico Weigelt's source files 2026-07-29 10:02:59 +02:00
dri2 xext: dri2: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:23:35 +02:00
dri3 treewide: Add and use fallbacks for libdrm and libgbm 2026-09-09 11:33:33 +02:00
geext Xext: geext: move it into its own subdir 2026-06-18 14:07:18 +02:00
glx GLX: fix stale returnBufSize leading to NULL deref in __GLX_GET_ANSWER_BUFFER 2026-08-24 13:40:12 +02:00
namespace license: add X11 OR MIT OR AGPL-3.0-or-later to Enrico Weigelt's source files 2026-07-29 10:02:59 +02:00
panoramiX Xext: panoramiX: declare where needed in PanoramiXCreateConnectionBlock() 2026-10-01 11:26:55 +02:00
present Xext/present: Copy the present info struct instead of just the pointer 2026-08-19 10:43:54 +02:00
pseudoramiX xext: pseudoramix: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:27:05 +02:00
randr Xext: randr: call dixInitConnectionBlock() on screen size change 2026-09-25 19:27:57 +02:00
record xext: record: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:59 +02:00
render dix: CreateConnectionBlock(): record number of roots 2026-09-25 21:27:00 +02:00
saver xext: saver: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:36:05 +02:00
security xext: security: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:48:38 +02:00
shape xext: panoramiX: helpers for checking wether it's enabled/disabled 2026-07-24 17:27:51 +02:00
shm xext: shm: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:48:42 +02:00
sync xext: sync: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:27:47 +02:00
xcmisc treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
xfixes xfixes: implement 6.1: forced server shutdown on client disconnect 2026-09-29 12:23:40 +02:00
xinput Xi: byte-swap DeviceChanged valuator and scroll data 2026-10-01 19:00:26 +02:00
xkeyboard xkb: Guard XkbAdjustGroup() against a keymap with no groups 2026-10-01 19:01:38 +02:00
xres xext: xres: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:35:50 +02:00
xselinux Xext: move some calls with return on error into macros 2026-06-24 19:23:43 +02:00
xtest Handle -Wimplicit-fallthrough warnings from gcc 16.1 2026-09-30 21:03:21 +02:00
xv xinerama: refactor post-init callback 2026-09-24 19:35:20 +02:00
hashtable.c treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
hashtable.h
meson.build Xext: remove the XF86-BigFont extension 2026-07-27 18:31:44 +02:00
xace.c xext: xace: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:49:15 +02:00
xace.h treewide: don't include <region.h> anymore 2025-11-27 19:27:27 +01:00
xacestr.h