xserver/Xext
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alan Coopersmith 5a8effe1e7 Xext/sync: Avoid dereference of invalid pointer if malloc() failed
Reported incorrectly in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817 as:

xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2835:33: acquire_memory: allocated here
xwayland-24.1.6/redhat-linux-build/../Xext/sync.c:2843:12: danger: ‘priv’ leaks here; was allocated at [(30)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/29)

but the "leak" is really saving the pointer in an uninitalized pointer in
a structure that was already freed when the malloc of the SysCounterInfo
struct failed in SyncCreateSystemCounter(), because it returned the address
of the freed struct instead of NULL to indicate failure.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2072>
2025-10-21 13:02:04 +02:00
..
damage treewide: macros lambda-esque screen iteration 2025-10-01 11:40:34 +02:00
namespace dix: replace XACE_CLIENT_ACCESS by direct callback 2025-10-07 10:52:54 +02:00
bigreq.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
dpms.c treewide: macros lambda-esque screen iteration 2025-10-01 11:40:34 +02:00
dpmsproc.h Xext: drop checking for HAVE_DIX_CONFIG_H 2025-06-12 16:50:20 +02:00
geext.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02: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 Xext: panoramix: inline SProc*()'s 2025-09-17 09:46:27 +02:00
panoramiX.c panoramix: avoid null dereference in PanoramiXMaybeAddDepth() 2025-10-02 18:46:33 +02:00
panoramiX.h Xinerama: lambda-esque macro for walking Xinerama screens 2025-09-09 14:12:40 +02:00
panoramiXh.h Xext: panoramix: inline SProc*()'s 2025-09-17 09:46:27 +02:00
panoramiXprocs.c dix: unexport ConnectionInfo field 2025-10-01 11:42:50 +02:00
panoramiXsrv.h Xinerama: lambda-esque macro for walking Xinerama screens 2025-09-09 14:12:40 +02:00
saver.c dix: replace XACE_SCREENSAVER_ACCESS by direct callback 2025-10-21 10:49:08 +02:00
security.c dix: replace XACE_CLIENT_ACCESS by direct callback 2025-10-07 10:52:54 +02:00
securitysrv.h
shape.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
shm.c Xext: shm: move per-screen private structure into privates area 2025-10-21 10:40:32 +02:00
shm_priv.h Xext: shm: unexport ShmSegType variable 2025-10-21 10:22:47 +02:00
shmint.h Xext: shm: shmint.h: drop superflous extern on function prototypes 2025-10-21 10:23:11 +02:00
sleepuntil.c treewide: fix serverGeneration int type mismatch 2025-08-13 11:52:03 +02:00
sleepuntil.h Xext: drop checking for HAVE_DIX_CONFIG_H 2025-06-12 16:50:20 +02:00
sync.c Xext/sync: Avoid dereference of invalid pointer if malloc() failed 2025-10-21 13:02:04 +02:00
syncsdk.h
syncsrv.h
vidmode.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
xace.c dix: replace XACE_SCREENSAVER_ACCESS by direct callback 2025-10-21 10:49:08 +02:00
xace.h dix: replace XACE_SCREENSAVER_ACCESS by direct callback 2025-10-21 10:49:08 +02:00
xacestr.h dix: replace XACE_SCREENSAVER_ACCESS by direct callback 2025-10-21 10:49:08 +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 dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
xf86bigfontsrv.h
xres.c Xext: xres: inline SProc*()'s 2025-09-30 09:57:36 +02:00
xselinux.h
xselinux_ext.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
xselinux_hooks.c dix: replace XACE_SCREENSAVER_ACCESS by direct callback 2025-10-21 10:49:08 +02:00
xselinux_label.c
xselinuxint.h
xtest.c dix: move request/response related functions to new request_priv.h header 2025-09-24 11:32:50 +02:00
xvdisp.c Xext: shm: unexport ShmSegType variable 2025-10-21 10:22:47 +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 Xext: xv: drop XvScreenKey macro 2025-09-26 15:35:25 +02:00
xvmc.c Xvmc: inline SProcXvMCDispatch() 2025-09-29 11:23:36 +02:00
xvmcext.h