xserver/Xext/xinput
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Enrico Weigelt, metux IT consult fbb5d946eb Xi: fix wrong/late NULL check on touch-class alloc in DeepCopyPointerClasses()
The failure check after allocating a new master device's touch class tested
'to->touch' (always true -- it was just calloc'd a few lines above and
already checked), not 'to->touch->touches' (the allocation that can
actually fail), and ran *after* the loop that indexes through it via
TouchInitTouchPoint() rather than before.

Trigger: reached via normal device-hierarchy-change processing
(ChangeMasterDeviceClasses -> DeepCopyDeviceClasses) whenever the
'touches' calloc() fails (memory pressure) while promoting a device's
touch class onto a master device that doesn't have one allocated yet.

Fix: check to->touch->touches before the loop, in the right order.

Found via a fleet-directed alloc-fail/UAF sweep of Xext/, not from a live
crash report.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-08-07 14:59:33 +02:00
..
allowev.c
chgdctl.c
chgfctl.c
chgkbd.c
chgkmap.c
chgprop.c
chgptr.c
chgptr.h
closedev.c
devbell.c
exevents.c Xi: fix wrong/late NULL check on touch-class alloc in DeepCopyPointerClasses() 2026-08-07 14:59:33 +02:00
exglobals.h Xi: turn XIAllMasks from variable into #define 2026-06-29 14:30:53 +02:00
extinit.c Xi: turn XIAllMasks from variable into #define 2026-06-29 14:30:53 +02:00
getbmap.c
getdctl.c
getfctl.c Xi: zero feedback reply buffer in ProcXGetFeedbackControl 2026-06-23 17:28:08 +02:00
getfocus.c
getkmap.c
getmmap.c
getprop.c
getprop.h
getselev.c
getvers.c
grabdev.c
grabdev.h
grabdevb.c
grabdevk.c
gtmotion.c
handlers.h
listdev.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
meson.build
opendev.c Xi: parentheses around macro argument symbols 2026-06-25 07:31:44 +02:00
queryst.c Xi: fix NULL pointer dereference in ProcXQueryDeviceState 2026-06-23 17:28:42 +02:00
selectev.c Xi: turn XIAllMasks from variable into #define 2026-06-29 14:30:53 +02:00
sendexev.c
setbmap.c
setdval.c
setfocus.c
setmmap.c
setmode.c
stubs.c
ungrdev.c
ungrdevb.c
ungrdevk.c
xiallowev.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xibarriers.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xibarriers.h
xichangecursor.c
xichangehierarchy.c
xichangehierarchy.h
xigetclientpointer.c
xigrabdev.c treewide: replace min/max macros by non-exported MIN/MAX and deprecate them 2026-06-25 14:06:17 +02:00
xipassivegrab.c treewide: replace min/max macros by non-exported MIN/MAX and deprecate them 2026-06-25 14:06:17 +02:00
xiproperty.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xiproperty.h
xiquerydevice.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xiquerydevice.h
xiquerypointer.c xext: xinput: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:28 +02:00
xiqueryversion.c
xiselectev.c Xi: xiselectev: fix OOB read in ProcXISelectEvents' non-swapped path 2026-07-03 19:59:53 +02:00
xisetclientpointer.c
xisetdevfocus.c
XIstubs.h
xiwarppointer.c