xserver/composite
Olivier Fourdan c1ff84bef2 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>
2025-02-25 11:43:01 +01:00
..
compalloc.c composite: Handle failure to redirect in compRedirectWindow() 2025-02-25 11:43:01 +01:00
compext.c composite: drop swapping request length fields 2025-02-06 22:28:49 +00:00
compinit.c os: move out extension disable flags to corresponing extensions 2025-02-07 12:00:53 +01: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: fix duplicate typedef of ScreenPtr 2024-04-18 00:51:06 +00:00
compoverlay.c rename old symbol PANORAMIX to XINERAMA 2025-02-06 15:51:27 +00:00
compwindow.c composite: use dixDestroyPixmap() instead of direct driver call 2025-02-12 17:48:30 +01:00
meson.build meson: hide C API if Xorg is disabled (like autotools) 2021-03-11 00:22:36 +00:00