xserver/Xext
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Enrico Weigelt, metux IT consult c03bc789ae dri2: fix off-by-one heap overflow in do_get_buffers() buffer array
The buffers array was sized min(count, DRI2BufferHiz) + 1, but count is
already capped at DRI2BufferHiz + 1 by the check above. The min() only
changes anything at that exact boundary (count == DRI2BufferHiz + 1), where
it throws away the array's '+1 slack' right when the main loop can
legitimately fill all 'count' slots itself, leaving no room for a
synthesized real/fake front buffer the client didn't explicitly request.

Trigger: a DRI2-capable client sends DRI2GetBuffers/DRI2GetBuffersWithFormat
with 11 attachment entries (the maximum allowed), none of them
DRI2BufferFrontLeft but at least one DRI2BufferBackLeft (so need_real_front
ends up set) -- the post-loop synthesis writes buffers[11], one past the
11-element allocation. Deterministic, no OOM required.

Fix: allocate count + 1 slots unconditionally; count is already bounded, so
this is never a meaningfully larger allocation.

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-07-09 12:56:04 +02:00
..
bigreq
composite treewide: replace min/max macros by non-exported MIN/MAX and deprecate them 2026-06-25 14:06:17 +02:00
damage Xext: parentheses around macro argument symbols 2026-06-25 07:37:12 +02:00
doublebuffer treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
dpms Xext: dpms: drop internal resource type 2026-06-25 11:09:12 +02:00
dri2 dri2: fix off-by-one heap overflow in do_get_buffers() buffer array 2026-07-09 12:56:04 +02:00
dri3 dri3: parentheses around macro argument symbols 2026-06-25 10:18:33 +02:00
geext
glx glx: zero-init xGLXQueryVersionReply to avoid leaking uninitialised bytes 2026-07-02 19:56:59 +02:00
namespace Xext: namespace: allow CreateColormap against the real root window 2026-07-03 20:05:08 +02:00
panoramiX panoramiX: zero-init xAllocColorReply to avoid leaking uninitialised bytes 2026-07-03 13:23:25 +02:00
present present: rename wrap()/unwrap() macros and move them into their only consumer. 2026-06-25 15:04:38 +02:00
pseudoramiX
randr treewide: replace min/max macros by non-exported MIN/MAX and deprecate them 2026-06-25 14:06:17 +02:00
record [PR #3162] Xext: record: use internal dixWriteToClient() instead of WriteToClient() 2026-06-26 23:17:09 +02:00
render render: filter: fix integer-overflow bypass of convolution size check 2026-07-03 19:59:53 +02:00
saver dix: add dixAnyOtherGrabbed() and unexport GrabInProgress 2026-06-25 15:31:46 +02:00
security Xext: move some calls with return on error into macros 2026-06-24 19:23:43 +02:00
shape Xext: move some calls with return on error into macros 2026-06-24 19:23:43 +02:00
shm Xext: parentheses around macro argument symbols 2026-06-25 07:37:12 +02:00
sync Xext: parentheses around macro argument symbols 2026-06-25 07:37:12 +02:00
xcmisc treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
xf86bigfont Xext/xf86bigfont: drop redundant SHM page-rounding and pagesize 2026-07-01 18:51:50 +02:00
xfixes treewide: fix result type of BitmapBytePad() to size_t 2026-06-29 15:44:48 +02:00
xinput Xi: xiselectev: fix OOB read in ProcXISelectEvents' non-swapped path 2026-07-03 19:59:53 +02:00
xkeyboard xkb: parentheses around macro argument symbols 2026-06-25 06:55:06 +02:00
xres treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
xselinux Xext: move some calls with return on error into macros 2026-06-24 19:23:43 +02:00
xtest Xext: move some calls with return on error into macros 2026-06-24 19:23:43 +02:00
xv Xext: xv: actually set the resources_initialized guard 2026-06-26 21:35:02 +02:00
hashtable.c treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
hashtable.h
meson.build
xace.c
xace.h
xacestr.h