xserver/Xext
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Enrico Weigelt, metux IT consult eb9a108624 render: fix glyph Picture/Pixmap leak on ProcRenderAddGlyphs bail path
The bail: path freed a newly-realized (!found) glyph with a raw
'--refcnt; free(glyph)' instead of FreeGlyph(), skipping
FreeGlyphPicture()'s release of the glyph's per-screen Picture/Pixmap
(created earlier in the same function via CreatePicture()/CreatePixmap(),
attached via SetGlyphPicture()).

Trigger: send X_RenderAddGlyphs with >= 2 glyphs where an earlier glyph is
well-formed (gets fully realized) and a later one is malformed (e.g.
declares more bitmap bytes than present, hitting the BadLength/goto bail
above) -- the earlier glyph's Picture/Pixmap leaks every such request,
repeatable unbounded-leak DoS. No OOM needed.

Fix: call FreeGlyph() instead, for both found and !found glyphs -- it
already does the right thing for each: a bare refcnt-- for a found glyph
(matching the old behavior), and the full teardown (hash removal if
present, FreeGlyphPicture(), free the struct) for a !found one. Safe to
call on a glyph never added to the global hash yet (AddGlyph() only runs on
the success path below): the hash lookup keys off this glyph's own sha1 and
simply finds an empty slot to not remove.

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-24 13:42:01 +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 Xext/dri3: Copy the DRI3 info struct instead of just the pointer 2026-08-19 10:42:49 +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: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:24:36 +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: Set the legacy RandR size range to include rotations 2026-08-10 10:12:47 +02:00
record xext: record: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:25:59 +02:00
render render: fix glyph Picture/Pixmap leak on ProcRenderAddGlyphs bail path 2026-08-24 13:42:01 +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 xext: xfixes: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:27:15 +02:00
xinput Xi: fix wrong/late NULL check on touch-class alloc in DeepCopyPointerClasses() 2026-08-07 14:59:33 +02:00
xkeyboard xext: xkeyboard: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:23:51 +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 xext: xtest: use stdbool's 'bool' instead of 'Bool' for local variables 2026-07-27 10:27:55 +02:00
xv xext: xv: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:23:21 +02:00
hashtable.c treewide: clean up includes of misc.h 2026-06-19 19:24:57 +02:00
hashtable.h Xext: hashtable.h: unexport functions not used by drivers 2025-06-12 16:51:36 +02:00
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 dix: replace XACE_SCREEN_ACCESS by direct callback 2025-10-22 13:53:25 +02:00