xserver/composite
Olivier Fourdan 40efa6359c 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>
(cherry picked from commit c1ff84bef2)

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1831>
2025-02-25 19:38:11 +01:00
..
compalloc.c composite: Handle failure to redirect in compRedirectWindow() 2025-02-25 19:38:11 +01:00
compext.c Remove "All rights reserved" from Oracle copyright notices 2023-02-25 09:40:41 -08:00
compinit.c composite: Free cs->implicitRedirectExceptions in compCloseScreen 2023-07-18 09:34:39 +00:00
compint.h Remove "All rights reserved" from Oracle copyright notices 2023-02-25 09:40:41 -08:00
compositeext.h composite: move out unexported CompositeIsImplicitRedirectException() 2024-03-03 22:50:07 +00:00
compositeext_priv.h composite: move out unexported CompositeIsImplicitRedirectException() 2024-03-03 22:50:07 +00:00
compoverlay.c Remove "All rights reserved" from Oracle copyright notices 2023-02-25 09:40:41 -08:00
compwindow.c composite: move out unexported CompositeIsImplicitRedirectException() 2024-03-03 22:50:07 +00:00
meson.build Drop Xorg DDX 2024-04-12 10:40:05 +02:00