xserver/composite
Olivier Fourdan 6fa76cbb67 composite: Handle failure to redirect in compRedirectWindow()
The function compCheckRedirect() may fail if it cannot allocate the
backing pixmap.

In that case, compRedirectWindow() will return a BadAlloc error.

However that failure code path will shortcut the validation of the
window tree marked just before, which leaves the validate data partly
initialized.

That causes a use of uninitialized pointer later.

The fix is to not shortcut the call to compHandleMarkedWindows() even in
the case of compCheckRedirect() returning an error.

CVE-2025-26599, ZDI-CAN-25851

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1828>
(cherry picked from commit c1ff84bef2)
2026-01-25 10:40:01 -08:00
..
compalloc.c composite: Handle failure to redirect in compRedirectWindow() 2026-01-25 10:40:01 -08:00
compext.c composite: drop swapping request length fields 2026-01-25 10:39:58 -08:00
compinit.c dix: unexport Ones() 2026-01-25 10:39:57 -08:00
compint.h Remove "All rights reserved" from Oracle copyright notices 2023-02-25 09:40:41 -08:00
compositeext.h composite: Expose CompositeIsImplicitRedirectException 2023-07-18 09:34:39 +00:00
compoverlay.c rename remaining RT_* defines to X11_RESTYPE_* 2026-01-19 12:48:30 -08:00
compwindow.c prevent name clash on Windows w/ RT_* defines 2026-01-19 12:48:30 -08:00
meson.build meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00