xserver/Xext
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mason Green 99e50b043e Xext/namespace: fix potential NULL-pointer dereference in select_ns()
When the configuration file is parsed at server startup, select_ns()
dynamically allocates namespace structures. However, it does not check
whether calloc() or strdup() successfully allocate memory.

If calloc() fails, the server dereferences a NULL pointer and crashes
instantly.

If strdup() fails, the namespace is added to the global list with a
NULL name. When the server later searches for a namespace, it calls
strlen() on the NULL name. This causes a delayed crash of the server
at runtime.

Fix this by adding standard FatalError() checks to handle allocation
failures safely during startup.

Signed-off-by: Mason Green <mason@greenm01.net>
(cherry picked from commit e0160fdb7d)
2026-10-08 14:49:51 +02:00
..
damage Xext: damage: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros 2025-12-21 12:01:33 +01:00
namespace Xext/namespace: fix potential NULL-pointer dereference in select_ns() 2026-10-08 14:49:51 +02:00
bigreq.c Xext: bigreq: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros 2025-12-21 11:54:12 +01:00
dpms.c os: move MILLI_PER_MIN and MILLI_PER_SECOND to osdep.h 2025-11-27 11:58:45 +01:00
dpmsproc.h xext: move include guards up to wrap the whole file 2025-11-21 15:20:11 +01:00
geext.c Xext: geext: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros 2025-12-21 11:54:29 +01:00
geext_priv.h xext: add/fix include guards where missing/broken 2025-06-27 13:58:05 +02:00
hashtable.c xext: replace xallocarray() by calloc() 2025-06-12 17:21:43 +02:00
hashtable.h Xext: hashtable.h: unexport functions not used by drivers 2025-06-12 16:51:36 +02:00
meson.build xfree86: move over xf86vidmode extension to hw/xfree86 2025-11-27 14:03:37 +01:00
panoramiX.c panoramiX: fail if we can't allocate our visual arrays 2026-04-30 19:19:20 +02:00
panoramiX.h panoramiX: make XINERAMA_FOR_EACH_SCREEN_* macros variadic 2026-07-02 19:52:54 +02:00
panoramiXh.h Xext: panoramix: inline SProc*()'s 2025-09-17 09:46:27 +02:00
panoramiXprocs.c panoramiX: zero-init xAllocColorReply to avoid leaking uninitialised bytes 2026-10-08 12:54:54 +02:00
panoramiXsrv.h xext: move include guards up to wrap the whole file 2025-11-21 15:20:11 +01:00
saver.c saver: re-fetch screen private after CheckScreenPrivate in CreateSaverWindow 2026-06-03 16:33:37 +02:00
security.c Xext: security: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros 2025-12-21 12:04:33 +01:00
securitysrv.h Xext: security: drop not needed include 2025-06-12 16:30:13 +02:00
shape.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
shm.c Revert 9a82f5c, bring back Cygwin support. 2025-12-21 12:59:03 +01:00
shm_priv.h Xext: shm: move ShmDescRec definition into shm.c 2025-10-21 20:36:44 +02:00
shmint.h Xext: shm: move ShmDescRec definition into shm.c 2025-10-21 20:36:44 +02:00
sleepuntil.c Xext: sleepuntil: drop obsolete support for internal server reset 2025-11-20 19:26:00 +01:00
sleepuntil.h xext: move include guards up to wrap the whole file 2025-11-21 15:20:11 +01:00
sync.c sync: fix deletion of counters and fences 2026-06-03 16:34:10 +02:00
syncsdk.h
syncsrv.h
xace.c dix: replace XACE_SCREEN_ACCESS by direct callback 2025-10-22 13:53:25 +02:00
xace.h treewide: don't include <region.h> anymore 2025-11-27 19:27:27 +01:00
xacestr.h dix: replace XACE_SCREEN_ACCESS by direct callback 2025-10-22 13:53:25 +02:00
xcmisc.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
xf86bigfont.c Xext: xf86bigfont: Include osdep.h for OsSignal. 2025-12-21 12:59:03 +01:00
xf86bigfontsrv.h
xres.c Xext/xres: fix client PID value swap in ConstructClientIdValue 2026-06-05 15:05:38 +02:00
xselinux.h include: unpexport SELINUX_* consts from include/global.h 2024-03-25 19:40:04 +00:00
xselinux_ext.c Xext/xselinux: add fast path to ProcSELinuxListSelections() 2025-10-21 13:02:04 +02:00
xselinux_hooks.c selinux: remap security classes on policyload 2026-04-21 10:29:49 +02:00
xselinux_label.c Xext/xselinux: avoid memory leak in SELinuxAtomToSID() 2025-10-21 13:02:04 +02:00
xselinuxint.h include: drop obsolete registry.h 2024-03-03 23:20:06 +00:00
xtest.c Handle -Wimplicit-fallthrough warnings from gcc 16.1 2026-08-24 12:41:10 +02:00
xvdisp.c Xext: xvideo: zero padding in ProcXvListImageFormats reply 2026-06-12 18:53:02 +02:00
xvdisp.h xext: add/fix include guards where missing/broken 2025-06-27 13:58:05 +02:00
xvdix.h treewide: preemptively revert !1714 where it affects ABI compatibility 2025-06-16 10:32:48 +02:00
xvdix_priv.h xv: drop forgotten SProcXvDispatch() prototype 2025-09-29 11:23:48 +02:00
xvmain.c xv: use embedded private instead of pointer 2025-10-26 13:57:49 +01:00
xvmc.c Xext: xvmc: guard against NULL screen private in ProcXvMCGetDRInfo 2026-06-12 18:55:59 +02:00
xvmcext.h xvmc: unexport XvMCFindXvImage() 2024-10-10 19:59:48 +00:00