xserver/miext
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Enrico Weigelt, metux IT consult d536dde7b4 rootless: fix dangling screen pixmap on RootlessUpdateScreenPixmap() OOM
On a calloc() failure while growing the rootless screen pixmap buffer, the
old buffer was already freed and pixmap_data_size already bumped to the new
(larger) size before the failure check -- leaving s->pixmap_data (and the
screen pixmap pPix, still pointing at the freed block via its prior
ModifyPixmapHeader() call) dangling. Worse, because pixmap_data_size was
already bumped, a later same-or-smaller-size call sees pixmap_data_size <
rowbytes as false and skips reallocating forever, permanently pinning the
dangling state instead of retrying.

Trigger: real host memory pressure during a rootless (Xquartz-style DDX)
geometry change.

Fix: allocate the replacement into a temporary first; only free the old
buffer and update pixmap_data_size/pixmap_data together once the new
allocation has succeeded.

Found via a fleet-directed alloc-fail/UAF sweep of Xext/, mi/, and miext/,
not from a live crash report. Verification note: miext/rootless/ only
compiles into hw/xquartz, which this Linux build has disabled -- checked
with a standalone `gcc -fsyntax-only` pass instead of the normal
ninja+meson-test build/test cycle used for the other fixes in this sweep.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-08-07 14:51:43 +02:00
..
damage miext: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:26:48 +02:00
rootless rootless: fix dangling screen pixmap on RootlessUpdateScreenPixmap() OOM 2026-08-07 14:51:43 +02:00
shadow miext: parentheses around macro argument symbols 2026-06-24 14:13:33 +02:00
sync miext: use stdbool's 'bool' instead of 'Bool' for local variables 2026-08-07 14:26:48 +02:00
extinit_priv.h Xext: remove the XF86-BigFont extension 2026-07-27 18:31:44 +02:00