public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/xorg-x11-server-Xwayland-epel] epel9: Update to 24.1.9
@ 2026-11-19 15:33 Troy Dawson
  0 siblings, 0 replies; only message in thread
From: Troy Dawson @ 2026-11-19 15:33 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/xorg-x11-server-Xwayland-epel
Branch : epel9
Commit : 5fdc848b19ec935d058cc9559044e91fb717cf41
Author : Troy Dawson <tdawson@redhat.com>
Date   : 2026-11-19T07:33:13-08:00
Stats  : +4428/-9 in 66 file(s)
URL    : https://src.fedoraproject.org/rpms/xorg-x11-server-Xwayland-epel/c/5fdc848b19ec935d058cc9559044e91fb717cf41?branch=epel9

Log:
Update to 24.1.9

---
diff --git a/.gitignore b/.gitignore
index a5adada..0357687 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /xwayland-22.1.9.tar.xz
+/xwayland-24.1.9.tar.xz

diff --git a/0001-Xi-avoid-memory-leak-when-hitting-bounds-check-for-b.patch b/0001-Xi-avoid-memory-leak-when-hitting-bounds-check-for-b.patch
new file mode 100644
index 0000000..5d96a22
--- /dev/null
+++ b/0001-Xi-avoid-memory-leak-when-hitting-bounds-check-for-b.patch
@@ -0,0 +1,42 @@
+From cee82793a0ff807154161d6f8cbe344f708d6e34 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu, 8 Oct 2026 17:17:20 -0700
+Subject: [PATCH xserver 1/2] Xi: avoid memory leak when hitting bounds check
+ for barrier events
+
+The fix for CVE-2026-93519 added a bounds check for barrier events in
+CreatePointerBarrierClient() and if it's hit immediately returns
+BadAlloc.  Unfortunately it was added after `ret` was already allocated
+and before *client_out is set to `ret`, so `ret` leaks.
+
+This fix changes it to jump to the same cleanup code to free(ret)
+that the rest of the function already uses.
+
+Fixes: 1f42cc1f0 ("Xi: add bounds check for barrier events in input_constrain_cursor")
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2352>
+(cherry picked from commit 8e901e6013803a94b25020bde384dd17966564eb)
+---
+ Xi/xibarriers.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
+index aad8db752..8cfc67555 100644
+--- a/Xi/xibarriers.c
++++ b/Xi/xibarriers.c
+@@ -602,8 +602,10 @@ CreatePointerBarrierClient(ClientPtr client,
+      * function */
+     xorg_list_for_each_entry(counter, &cs->barriers, entry) {
+         nbarriers++;
+-        if (nbarriers >= 32)
+-            return BadAlloc;
++        if (nbarriers >= 32) {
++            err = BadAlloc;
++            goto error;
++        }
+     }
+ 
+     ret->screen = screen;
+-- 
+2.56.0
+

diff --git a/0001-dix-Silence-a-compiler-warning-in-doListFontsAndAlia.patch b/0001-dix-Silence-a-compiler-warning-in-doListFontsAndAlia.patch
new file mode 100644
index 0000000..3365fde
--- /dev/null
+++ b/0001-dix-Silence-a-compiler-warning-in-doListFontsAndAlia.patch
@@ -0,0 +1,45 @@
+From e710e570b1709d100072a8ab7d05c2aefaf41a1b Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Mon, 15 Jun 2026 14:00:19 +0200
+Subject: [PATCH xserver] dix: Silence a compiler warning in
+ doListFontsAndAliases()
+
+Compiler complains that "resolvedlen" might be uninitialized:
+
+| dix/dixfonts.c:559:5: var_decl: Declaring variable "resolvedlen" without initializer.
+| dix/dixfonts.c:674:17: uninit_use: Using uninitialized value "resolvedlen".
+|    672|                    * is complete.
+|    673|                    */
+|    674|->                 if (resolvedlen > XLFDMAXFONTNAMELEN) {
+|    675|                       err = BadFontName;
+|    676|                       goto ContBadFontName;
+
+Most likely a false positive, while immediately after the (newly added)
+test, there was a memcpy() using "resolvedlen" and the compiler did not
+choke on that before.
+
+Either way, initializing "resolvedlen" to 0 is a small price to pay to
+silence the compiler warning and keep us on the safe side.
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2237>
+---
+ dix/dixfonts.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dix/dixfonts.c b/dix/dixfonts.c
+index 3c6c9d594..cf2b45d4f 100644
+--- a/dix/dixfonts.c
++++ b/dix/dixfonts.c
+@@ -556,7 +556,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
+     int err = Successful;
+     FontNamesPtr names = NULL;
+     char *name, *resolved = NULL;
+-    int namelen, resolvedlen;
++    int namelen, resolvedlen = 0;
+     int nnames;
+     int stringLens;
+     int i;
+-- 
+2.54.0
+

diff --git a/0001-glx-free-old-context-tag-before-allocating-new-one-i.patch b/0001-glx-free-old-context-tag-before-allocating-new-one-i.patch
new file mode 100644
index 0000000..432a09d
--- /dev/null
+++ b/0001-glx-free-old-context-tag-before-allocating-new-one-i.patch
@@ -0,0 +1,58 @@
+From 9ca6ab9dea4cc8bce8a0258318976c5c690386a3 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sun, 31 May 2026 19:37:02 +1000
+Subject: [PATCH xserver 1/3] glx: free old context tag before allocating new
+ one in CommonMakeCurrent
+
+oldTag in CommonMakeCurrent() is a pointer to cl->contextTags[...].
+CommonMakeCurrent() may realloc(cl->contextTags) and thus move the
+memory, leaving oldTag as dangling pointer.
+
+If we then GlxFreeContextTag(oldTag) we end up writing into freed
+memory.
+
+Fix this by freeing oldTag before CommonMakeNewCurrent().
+
+This vulnerability was discovered by:
+Anonymous working with Trend Micro Zero Day Initiative
+
+CVE-2026-56000/ZDI-CAN-30561
+
+Fixes: 4781f2a5a8c2 ("GLX: Free the tag of the old context later")
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 2779affbdb4354e894f490e56f962527d6125043)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2251>
+---
+ glx/vndcmds.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/glx/vndcmds.c b/glx/vndcmds.c
+index cb3732d2a..97a6b685e 100644
+--- a/glx/vndcmds.c
++++ b/glx/vndcmds.c
+@@ -256,6 +256,11 @@ static int CommonMakeCurrent(ClientPtr client,
+             if (ret != Success) {
+                 return ret;
+             }
++            // Free the old tag before calling CommonMakeNewCurrent(),
++            // which may call GlxAllocContextTag() and realloc the
++            // contextTags array, invalidating the oldTag pointer.
++            GlxFreeContextTag(oldTag);
++            oldTag = NULL;
+         }
+ 
+         if (newVendor != NULL) {
+@@ -266,9 +271,6 @@ static int CommonMakeCurrent(ClientPtr client,
+         } else {
+             reply.contextTag = 0;
+         }
+-
+-        GlxFreeContextTag(oldTag);
+-        oldTag = NULL;
+     }
+ 
+     reply.contextTag = GlxCheckSwap(client, reply.contextTag);
+-- 
+2.55.0
+

diff --git a/0001-os-use-close-on-exec-for-X-server-socket-to-prevent-.patch b/0001-os-use-close-on-exec-for-X-server-socket-to-prevent-.patch
new file mode 100644
index 0000000..f5a1781
--- /dev/null
+++ b/0001-os-use-close-on-exec-for-X-server-socket-to-prevent-.patch
@@ -0,0 +1,45 @@
+From de771dee955914902ddc8e183fffb91446f36ace Mon Sep 17 00:00:00 2001
+From: Twaik Yont <9674930+twaik@users.noreply.github.com>
+Date: Thu, 10 Apr 2025 17:55:58 +0300
+Subject: [PATCH xserver 01/31] os: use close-on-exec for X server socket to
+ prevent fd leaks
+
+In most typical Linux X servers (like Xvfb, Xephyr, or Xwayland),
+no child process outlives the server, so this issue rarely arises.
+However, in embedded X servers (based on Xvfb or Kdrive) or in
+custom Xorg modules, the server might launch a long-running command
+with regular fork+exec calls. If the X server crashes or exits while
+that command is still running (for example, it spawns a tombstone
+generator or any process that hangs or turns to zombie), the file
+descriptor associated with the abstract socket can remain open in the
+child process. This leads to the kernel refusing to allow another X
+server to bind the same socket until the child process terminates
+(because there is no explicit way to unlink abstract socket, unlike
+Unix socket). By marking the file descriptor as close-on-exec, we
+ensure it is automatically closed in child processes, preserving the
+ability of a new X server process to bind the socket immediately.
+
+Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>
+(cherry picked from commit 5568b0f83f388a295f42d49411ced17387043794)
+(cherry picked from commit 59673c0503262b75791772af4c62120debebda61)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ os/connection.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/os/connection.c b/os/connection.c
+index 3223eeb5d..8a28df68e 100644
+--- a/os/connection.c
++++ b/os/connection.c
+@@ -281,6 +281,7 @@ CreateWellKnownSockets(void)
+         int fd = _XSERVTransGetConnectionNumber(ListenTransConns[i]);
+ 
+         ListenTransFds[i] = fd;
++        _XSERVTransSetOption(ListenTransConns[i], TRANS_CLOSEONEXEC, 0);
+         SetNotifyFd(fd, EstablishNewConnections, X_NOTIFY_READ, NULL);
+ 
+         if (!_XSERVTransIsLocal(ListenTransConns[i]))
+-- 
+2.54.0
+

diff --git a/0001-sync-fix-deletion-of-counters-and-fences.patch b/0001-sync-fix-deletion-of-counters-and-fences.patch
new file mode 100644
index 0000000..8e625bd
--- /dev/null
+++ b/0001-sync-fix-deletion-of-counters-and-fences.patch
@@ -0,0 +1,122 @@
+From 4b9638714e669af5850ef4d4bfc5bc445c0c5dda Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 20 Apr 2026 11:16:13 +1000
+Subject: [PATCH xserver 1/7] sync: fix deletion of counters and fences
+
+Both FreeCounter() and miSyncDestroyFence() iterate over the trigger list
+and invoke the CounterDestroyed callback on each trigger.
+
+The CounterDestroyed callback (e.g. SyncAwaitTriggerFired) may call
+FreeResource/FreeAwait, which frees the SyncAwaitUnion containing all
+SyncAwait structs in the same Await group.
+
+When multiple conditions in a single Await reference the same sync
+object (counter or fence), the first callback frees all SyncAwait
+structs while subsequent trigger list nodes still reference them. On the
+next iteration, reading ptl->next or ptl->pTrigger dereferences freed
+memory, leading to a use-after-free.
+
+We need separate fixes for separate issues here to fix this in one go
+- use our null-terminated list macro to make sure our next pointer stays
+  valid (the code accessed ptl->next after freeing it)
+- update the list head before deleting the trigger, eventually this ends
+  up being NULL anyway but meanwhile the list head is a valid list
+  during CounterDestroyed
+- check if we actually do have a trigger before dereferencing the
+  callback
+- Set all triggers to NULL if they are shared so we don't dereference
+  potentially freed memory
+
+This vulnerability was discovered by:
+Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-30159 (miSyncDestroyFence), ZDI-CAN-30163 (FreeCounter)
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit f5abfb61994471023d8c6470428c8e30c411cc0b)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2230>
+---
+ Xext/sync.c         | 32 +++++++++++++++++++++++++-------
+ miext/sync/misync.c | 12 ++++++++----
+ 2 files changed, 33 insertions(+), 11 deletions(-)
+
+diff --git a/Xext/sync.c b/Xext/sync.c
+index 1e250d176..09e31b5c8 100644
+--- a/Xext/sync.c
++++ b/Xext/sync.c
+@@ -1163,9 +1163,12 @@ FreeCounter(void *env, XID id)
+         SyncTriggerList *ptl, *pnext;
+ 
+         /* tell all the counter's triggers that counter has been destroyed */
+-        for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
+-            (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
+-            pnext = ptl->next;
++        nt_list_for_each_entry_safe(ptl, pnext, pCounter->sync.pTriglist, next) {
++            /* Remove it from the list first so CounterDestroyed
++             * callbacks have a valid list to iterate */
++            pCounter->sync.pTriglist = pnext;
++            if (ptl->pTrigger)
++                (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
+             free(ptl); /* destroy the trigger list as we go */
+         }
+         if (IsSystemCounter(pCounter)) {
+@@ -1197,13 +1200,28 @@ FreeAwait(void *addr, XID id)
+ 
+     for (numwaits = pAwaitUnion->header.num_waitconditions; numwaits;
+          numwaits--, pAwait++) {
+-        /* If the counter is being destroyed, FreeCounter will delete
+-         * the trigger list itself, so don't do it here.
++        /* If the counter is being destroyed, FreeCounter/miSyncDestroyFence
++         * will delete the trigger list itself, so don't do it here.
++         * However, we must NULL out the pTrigger pointer in the trigger list
++         * node so the destroy loop knows not to dereference it - the backing
++         * SyncAwait memory is about to be freed below.
+          */
+         SyncObject *pSync = pAwait->trigger.pSync;
+ 
+-        if (pSync && !pSync->beingDestroyed)
+-            SyncDeleteTriggerFromSyncObject(&pAwait->trigger);
++        if (pSync) {
++            if (!pSync->beingDestroyed) {
++                SyncDeleteTriggerFromSyncObject(&pAwait->trigger);
++            } else {
++                SyncTriggerList *ptl;
++
++                nt_list_for_each_entry(ptl, pSync->pTriglist, next) {
++                    if (ptl->pTrigger == &pAwait->trigger) {
++                        ptl->pTrigger = NULL;
++                        break;
++                    }
++                }
++            }
++        }
+     }
+     free(pAwaitUnion);
+     return Success;
+diff --git a/miext/sync/misync.c b/miext/sync/misync.c
+index 77b4659c1..0880d1ee1 100644
+--- a/miext/sync/misync.c
++++ b/miext/sync/misync.c
+@@ -115,10 +115,14 @@ miSyncDestroyFence(SyncFence * pFence)
+         SyncScreenPrivPtr pScreenPriv = SYNC_SCREEN_PRIV(pScreen);
+         SyncTriggerList *ptl, *pNext;
+ 
+-        /* tell all the fence's triggers that the counter has been destroyed */
+-        for (ptl = pFence->sync.pTriglist; ptl; ptl = pNext) {
+-            (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
+-            pNext = ptl->next;
++        /* tell all the fence's triggers that the fence has been destroyed.
++         * Update pTriglist before each callback and free so that FreeAwait
++         * sees a valid list head when scanning for triggers to NULL out.
++         */
++        nt_list_for_each_entry_safe(ptl, pNext, pFence->sync.pTriglist, next) {
++            pFence->sync.pTriglist = pNext;
++            if (ptl->pTrigger)
++                (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger);
+             free(ptl); /* destroy the trigger list as we go */
+         }
+ 
+-- 
+2.54.0
+

diff --git a/0001-xkb-NULL-text-pointer-after-free-in-_CheckSetDoodad-.patch b/0001-xkb-NULL-text-pointer-after-free-in-_CheckSetDoodad-.patch
new file mode 100644
index 0000000..88d9fae
--- /dev/null
+++ b/0001-xkb-NULL-text-pointer-after-free-in-_CheckSetDoodad-.patch
@@ -0,0 +1,50 @@
+From db2b484c1529b19c45ce7dbcf6029696e18bca2a Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 16:53:56 +1000
+Subject: [PATCH xserver 01/12] xkb: NULL text pointer after free in
+ _CheckSetDoodad error path
+
+_CheckSetDoodad() allocates doodad->text.text via _GetCountedString()
+and then attempts to allocate doodad->text.font. If the font string
+allocation fails (e.g. because the font string length extends past
+the request boundary), the error handler frees doodad->text.text but
+does not NULL the pointer. The doodad was already added to the geometry
+by XkbAddGeomDoodad() before the string allocations, so when
+XkbFreeGeometry() runs cleanup, _XkbClearDoodad() frees the same
+dangling pointer again, resulting in a double-free.
+
+NULL the pointer after freeing it to prevent the double-free.
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31221
+
+CVE-2026-88812
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 0d1b1b0bad86c9ea2a3b7ca5a70e681dc69f1ecc)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ xkb/xkb.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 6c18dd874..3f32ff9af 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -5301,7 +5301,8 @@ _CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req,
+             return status;
+         status = _GetCountedString(&wire, client, &doodad->text.font);
+         if (status != Success) {
+-            free (doodad->text.text);
++            free(doodad->text.text);
++            doodad->text.text = NULL;
+             return status;
+         }
+         break;
+-- 
+2.56.0
+

diff --git a/0001-xkb-fix-buffer-re-use-in-_XkbSetCompatMap.patch b/0001-xkb-fix-buffer-re-use-in-_XkbSetCompatMap.patch
new file mode 100644
index 0000000..5b37197
--- /dev/null
+++ b/0001-xkb-fix-buffer-re-use-in-_XkbSetCompatMap.patch
@@ -0,0 +1,47 @@
+From ae7db5180f0b38fea3fc6cbab022fe861b1af9f3 Mon Sep 17 00:00:00 2001
+From: Peter Harris <pharris2@rocketsoftware.com>
+Date: Thu, 15 Jan 2026 15:54:09 -0500
+Subject: [PATCH xserver 1/6] xkb: fix buffer re-use in _XkbSetCompatMap
+
+If the "compat" buffer has previously been truncated, there will be
+unused space in the buffer. The code uses this space, but does not
+update the number of valid entries in the buffer.
+
+In the best case, this leads to the new compat entries being ignored. In the
+worst case, if there are any "skipped" compat entries, the number of
+valid entries will be corrupted, potentially leading to a buffer read
+overrun when processing a future request.
+
+Set the number of used "compat" entries when re-using previously
+allocated space in the buffer.
+
+CVE-2026-33999, ZDI-CAN-28593
+
+This vulnerability was discovered by:
+Jan-Niklas Sohn working with TrendAI Zero Day Initiative
+
+Signed-off-by: Peter Harris <pharris2@rocketsoftware.com>
+Acked-by: Olivier Fourdan <ofourdan@redhat.com>
+(cherry picked from commit b024ae1749ee58c6fbf863b9a1f5dc440fee2e1b)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2177>
+---
+ xkb/xkb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index befdfcc7c..65efa69e1 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -3002,7 +3002,7 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev,
+                 return BadAlloc;
+             }
+         }
+-        else if (req->truncateSI) {
++        else if (req->truncateSI || req->firstSI + req->nSI > compat->num_si) {
+             compat->num_si = req->firstSI + req->nSI;
+         }
+         sym = &compat->sym_interpret[req->firstSI];
+-- 
+2.53.0
+

diff --git a/0001-xwayland-Handle-GetCurrentClient-returning-NULL-in-x.patch b/0001-xwayland-Handle-GetCurrentClient-returning-NULL-in-x.patch
new file mode 100644
index 0000000..deff6fe
--- /dev/null
+++ b/0001-xwayland-Handle-GetCurrentClient-returning-NULL-in-x.patch
@@ -0,0 +1,46 @@
+From e75146412aae1f27918812cfdd0a67342f3f0cfe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
+Date: Tue, 21 Apr 2026 12:46:01 +0200
+Subject: [PATCH xserver] xwayland: Handle GetCurrentClient returning NULL in
+ xwl_reparent_window
+
+It's not the WM client in that case.
+
+Fixes crash.
+
+Closes: https://gitlab.freedesktop.org/xorg/xserver/-/work_items/1885
+Fixes: 6aacf04f51cf ("xwayland: Add heuristic for WM windows based on reparenting")
+(cherry picked from commit 6357c9afce656cdc250a8475eaa86647d0d6e501)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2189>
+---
+ hw/xwayland/xwayland-window.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
+index afb421989..e07547e0f 100644
+--- a/hw/xwayland/xwayland-window.c
++++ b/hw/xwayland/xwayland-window.c
+@@ -1878,6 +1878,7 @@ xwl_reparent_window(WindowPtr window, WindowPtr prior_parent)
+     ScreenPtr screen = window->drawable.pScreen;
+     struct xwl_screen *xwl_screen = xwl_screen_get(screen);
+     WindowPtr parent = window->parent;
++    ClientPtr current_client;
+     Bool *is_wm_window;
+ 
+     if (xwl_screen->ReparentWindow) {
+@@ -1887,8 +1888,10 @@ xwl_reparent_window(WindowPtr window, WindowPtr prior_parent)
+         screen->ReparentWindow = xwl_reparent_window;
+     }
+ 
++    current_client = GetCurrentClient();
+     if (!parent->parent ||
+-        GetCurrentClient()->index != xwl_screen->wm_client_id)
++        !current_client ||
++        current_client->index != xwl_screen->wm_client_id)
+         return;
+ 
+     /* If the WM client reparents a window, mark the new parent as a WM window */
+-- 
+2.53.0
+

diff --git a/0002-Xi-fix-event_id-time-delta-in-generated-barrier-even.patch b/0002-Xi-fix-event_id-time-delta-in-generated-barrier-even.patch
new file mode 100644
index 0000000..2bc1243
--- /dev/null
+++ b/0002-Xi-fix-event_id-time-delta-in-generated-barrier-even.patch
@@ -0,0 +1,60 @@
+From d3dafa1a36ccd7dbfbfc14250b7755f11b6d4499 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu, 8 Oct 2026 17:53:59 -0700
+Subject: [PATCH xserver 2/2] Xi: fix event_id & time delta in generated
+ barrier events
+
+The fix for CVE-2026-93519 moved the updates of pbd->last_timestamp
+and pbd->barrier_event_id from after they were used to generate the
+data in events to before, causing the event_id to be one too high,
+and the time delta (ms - pbd->last_timestamp) to always be zero.
+
+This fix moves them back to being after they are used to generate
+the event data.
+
+Fixes: 1f42cc1f ("Xi: add bounds check for barrier events in input_constrain_cursor")
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2353>
+(cherry picked from commit 98aed9ddba7b42d2a46fcc1f343f4b392967b838)
+---
+ Xi/xibarriers.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
+index 8cfc67555..52bc6ecc8 100644
+--- a/Xi/xibarriers.c
++++ b/Xi/xibarriers.c
+@@ -417,7 +417,7 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
+     DeviceIntPtr master;
+ 
+     /* We cannot know how many events are available in *events, but
+-     * we know it all DDX very protbably allocated them with
++     * we know that all DDX very probably allocated them with
+      * GetMaximumEventsNum() and fill_pointer_events() may have added one.
+      *
+      * Let's cap at a maximum of 64 barrier events which is way more than
+@@ -517,10 +517,6 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
+             continue;
+ 
+         pbd->hit = FALSE;
+-        pbd->last_timestamp = ms;
+-        /* If we've left the hit box, this is the
+-         * start of a new event ID. */
+-        pbd->barrier_event_id++;
+ 
+         if (*nevents < MAX_BARRIER_EVENTS) {
+             ev.type = ET_BarrierLeave;
+@@ -542,6 +538,10 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
+             *nevents += 1;
+         }
+ 
++        pbd->last_timestamp = ms;
++        /* If we've left the hit box, this is the
++         * start of a new event ID. */
++        pbd->barrier_event_id++;
+     }
+ 
+  out:
+-- 
+2.56.0
+

diff --git a/0002-fb-mi-glamor-reject-glyphs-with-negative-dimensions.patch b/0002-fb-mi-glamor-reject-glyphs-with-negative-dimensions.patch
new file mode 100644
index 0000000..ae0ce07
--- /dev/null
+++ b/0002-fb-mi-glamor-reject-glyphs-with-negative-dimensions.patch
@@ -0,0 +1,80 @@
+From 822fac4443178ba7031b90dc35b91ea3af4dc7f6 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 1 Jun 2026 20:44:34 +1000
+Subject: [PATCH xserver 2/3] fb/mi/glamor: reject glyphs with negative
+ dimensions
+
+GLYPHWIDTHPIXELS and GLYPHHEIGHTPIXELS compute glyph dimensions from
+signed INT16 fields. A crafted PCF font can produce negative results
+(e.g. rightSideBearing < leftSideBearing).
+
+All callees have a while (height--) loop which will end up in OOB writes
+for negative height values.
+
+In the case of a negative height, some callees cast to size_t or end up
+with negative strides.
+
+The same pattern exists in fbPoloyGlyphBit, miPolyGlyphBlt and
+glamor_poly_glyph_blt_gl, so let's fix all of them in one go.
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit e31efd3e106e53bfc29d499ff0a34b0d20013f2d)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2251>
+---
+ fb/fbglyph.c             | 4 ++--
+ glamor/glamor_glyphblt.c | 2 +-
+ mi/miglblt.c             | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/fb/fbglyph.c b/fb/fbglyph.c
+index 1bdc2d4fd..5c9318f5e 100644
+--- a/fb/fbglyph.c
++++ b/fb/fbglyph.c
+@@ -95,7 +95,7 @@ fbPolyGlyphBlt(DrawablePtr pDrawable,
+         pglyph = FONTGLYPHBITS(pglyphBase, pci);
+         gWidth = GLYPHWIDTHPIXELS(pci);
+         gHeight = GLYPHHEIGHTPIXELS(pci);
+-        if (gWidth && gHeight) {
++        if (gWidth > 0 && gHeight > 0) {
+             gx = x + pci->metrics.leftSideBearing;
+             gy = y - pci->metrics.ascent;
+             if (glyph && gWidth <= sizeof(FbStip) * 8 &&
+@@ -197,7 +197,7 @@ fbImageGlyphBlt(DrawablePtr pDrawable,
+         pglyph = FONTGLYPHBITS(pglyphBase, pci);
+         gWidth = GLYPHWIDTHPIXELS(pci);
+         gHeight = GLYPHHEIGHTPIXELS(pci);
+-        if (gWidth && gHeight) {
++        if (gWidth > 0 && gHeight > 0) {
+             gx = x + pci->metrics.leftSideBearing;
+             gy = y - pci->metrics.ascent;
+             if (glyph && gWidth <= sizeof(FbStip) * 8 &&
+diff --git a/glamor/glamor_glyphblt.c b/glamor/glamor_glyphblt.c
+index 4ab23b333..09d232609 100644
+--- a/glamor/glamor_glyphblt.c
++++ b/glamor/glamor_glyphblt.c
+@@ -90,7 +90,7 @@ glamor_poly_glyph_blt_gl(DrawablePtr drawable, GCPtr gc,
+             int h = GLYPHHEIGHTPIXELS(charinfo);
+             uint8_t *glyphbits = FONTGLYPHBITS(NULL, charinfo);
+ 
+-            if (w && h) {
++            if (w > 0 && h > 0) {
+                 int glyph_x = x + charinfo->metrics.leftSideBearing;
+                 int glyph_y = y - charinfo->metrics.ascent;
+                 int glyph_stride = GLYPHWIDTHBYTESPADDED(charinfo);
+diff --git a/mi/miglblt.c b/mi/miglblt.c
+index 169d44ffc..8e33e90d8 100644
+--- a/mi/miglblt.c
++++ b/mi/miglblt.c
+@@ -143,7 +143,7 @@ miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyp
+         pglyph = FONTGLYPHBITS(pglyphBase, pci);
+         gWidth = GLYPHWIDTHPIXELS(pci);
+         gHeight = GLYPHHEIGHTPIXELS(pci);
+-        if (gWidth && gHeight) {
++        if (gWidth > 0 && gHeight > 0) {
+             nbyGlyphWidth = GLYPHWIDTHBYTESPADDED(pci);
+             nbyPadGlyph = BitmapBytePad(gWidth);
+ 
+-- 
+2.55.0
+

diff --git a/0002-sync-restart-trigger-list-iteration-in-SyncChangeCou.patch b/0002-sync-restart-trigger-list-iteration-in-SyncChangeCou.patch
new file mode 100644
index 0000000..56de627
--- /dev/null
+++ b/0002-sync-restart-trigger-list-iteration-in-SyncChangeCou.patch
@@ -0,0 +1,71 @@
+From b1878535c1ccc04f16c244b9884002b7a21fb361 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 20 Apr 2026 11:17:08 +1000
+Subject: [PATCH xserver 2/7] sync: restart trigger list iteration in
+ SyncChangeCounter after TriggerFired
+
+This is the equivalent check to miSyncTriggerFence() from
+commit f19ab94ba9c8 ("miext/sync: Fix use-after-free in miSyncTriggerFence()")
+
+When a trigger fires via SyncAwaitTriggerFired, the resulting
+FreeResource/FreeAwait call invokes SyncDeleteTriggerFromSyncObject for
+every trigger in the same Await group. This unlinks and frees the
+corresponding trigger list nodes - potentially including the node pnext
+points to.
+
+Fix by restarting iteration from the list head after a trigger fires, since
+TriggerFired may have arbitrarily mutated the list. Triggers that have fired
+are removed from the list by FreeAwait, so restarting cannot cause infinite
+loops.
+
+This vulnerability was discovered by:
+Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-30164
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit bdd7bf57af208b1ddf57d4683d67104443b44812)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2230>
+---
+ Xext/sync.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/Xext/sync.c b/Xext/sync.c
+index 09e31b5c8..ea15f3746 100644
+--- a/Xext/sync.c
++++ b/Xext/sync.c
+@@ -721,8 +721,29 @@ SyncChangeCounter(SyncCounter * pCounter, int64_t newval)
+     /* run through triggers to see if any become true */
+     for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) {
+         pnext = ptl->next;
+-        if ((*ptl->pTrigger->CheckTrigger) (ptl->pTrigger, oldval))
++        if ((*ptl->pTrigger->CheckTrigger) (ptl->pTrigger, oldval)) {
+             (*ptl->pTrigger->TriggerFired) (ptl->pTrigger);
++            /* TriggerFired may have called SyncDeleteTriggerFromSyncObject
++             * for sibling triggers in the same Await group, freeing their
++             * trigger list nodes - potentially including pnext. Verify
++             * pnext is still on the counter's trigger list; if not,
++             * restart from the list head.
++             *
++             * Unlike miSyncTriggerFence() we cannot use a do/while
++             * restart loop here: counter trigger lists may contain alarm
++             * triggers which are not removed after firing and would cause
++             * an infinite loop when delta is 0.
++             */
++            if (pnext) {
++                SyncTriggerList *tmp;
++                for (tmp = pCounter->sync.pTriglist; tmp; tmp = tmp->next) {
++                    if (tmp == pnext)
++                        break;
++                }
++                if (!tmp)
++                    pnext = pCounter->sync.pTriglist;
++            }
++        }
+     }
+ 
+     if (IsSystemCounter(pCounter)) {
+-- 
+2.54.0
+

diff --git a/0002-xf86bigfont-fix-Wimplicit-function-declaration-error.patch b/0002-xf86bigfont-fix-Wimplicit-function-declaration-error.patch
new file mode 100644
index 0000000..4708712
--- /dev/null
+++ b/0002-xf86bigfont-fix-Wimplicit-function-declaration-error.patch
@@ -0,0 +1,47 @@
+From e3e933a06dc992b033968d5634c7d990d53737f5 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 10 Aug 2025 09:43:33 -0700
+Subject: [PATCH xserver 02/31] xf86bigfont: fix
+ -Wimplicit-function-declaration error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Build breaks with gcc 14 & later when xf86bigfont is enabled:
+
+../Xext/xf86bigfont.c: In function ‘XFree86BigfontExtensionInit’:
+../Xext/xf86bigfont.c:709:28: error: implicit declaration of function
+ ‘xfont2_allocate_font_private_index’;
+ did you mean ‘AllocateFontPrivateIndex’? [-Wimplicit-function-declaration]
+  709 |         FontShmdescIndex = xfont2_allocate_font_private_index();
+      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      |                            AllocateFontPrivateIndex
+
+Fixes: 05a793f5b ("dix: Switch to the libXfont2 API (v2)")
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 0617f6075b6a867c90912ccaf9de2200d06a5419)
+(cherry picked from commit 5a1fe4e4f12ccc6a91023bc6725209c2f8c28400)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ Xext/xf86bigfont.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
+index 44a8e7dd8..cf7d52fb8 100644
+--- a/Xext/xf86bigfont.c
++++ b/Xext/xf86bigfont.c
+@@ -58,6 +58,10 @@
+ 
+ #include <X11/X.h>
+ #include <X11/Xproto.h>
++#include <X11/extensions/xf86bigfproto.h>
++#include <X11/fonts/fontstruct.h>
++#include <X11/fonts/libxfont2.h>
++
+ #include "misc.h"
+ #include "os.h"
+ #include "dixstruct.h"
+-- 
+2.54.0
+

diff --git a/0002-xkb-Fix-bounds-check-in-_CheckSetGeom.patch b/0002-xkb-Fix-bounds-check-in-_CheckSetGeom.patch
new file mode 100644
index 0000000..f7226b5
--- /dev/null
+++ b/0002-xkb-Fix-bounds-check-in-_CheckSetGeom.patch
@@ -0,0 +1,70 @@
+From 30f34b41ab8d00bb6f952e4c34fb913c2d89584d Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Wed, 18 Feb 2026 16:03:11 +0100
+Subject: [PATCH xserver 2/6] xkb: Fix bounds check in _CheckSetGeom()
+
+As reported by valgrind:
+
+  == Conditional jump or move depends on uninitialised value(s)
+  ==    at 0x5CBE66: SrvXkbAddGeomKeyAlias (XKBGAlloc.c:585)
+  ==    by 0x5AC7D5: _CheckSetGeom (xkb.c:5607)
+  ==    by 0x5AC952: _XkbSetGeometry (xkb.c:5643)
+  ==    by 0x5ACB58: ProcXkbSetGeometry (xkb.c:5684)
+  ==    by 0x5B0DAC: ProcXkbDispatch (xkb.c:7070)
+  ==    by 0x4A28C5: Dispatch (dispatch.c:553)
+  ==    by 0x4B0B24: dix_main (main.c:274)
+  ==    by 0x42915E: main (stubmain.c:34)
+  ==  Uninitialised value was created by a heap allocation
+  ==    at 0x4840B26: malloc (vg_replace_malloc.c:447)
+  ==    by 0x5E13B0: AllocateInputBuffer (io.c:981)
+  ==    by 0x5E05CD: InsertFakeRequest (io.c:516)
+  ==    by 0x4AA860: NextAvailableClient (dispatch.c:3629)
+  ==    by 0x5DE0D7: AllocNewConnection (connection.c:628)
+  ==    by 0x5DE2C6: EstablishNewConnections (connection.c:692)
+  ==    by 0x5DE600: HandleNotifyFd (connection.c:809)
+  ==    by 0x5E2598: ospoll_wait (ospoll.c:660)
+  ==    by 0x5DA00C: WaitForSomething (WaitFor.c:208)
+  ==    by 0x4A26E5: Dispatch (dispatch.c:493)
+  ==    by 0x4B0B24: dix_main (main.c:274)
+  ==    by 0x42915E: main (stubmain.c:34)
+
+Each key alias entry contains two key names (the alias and the real key
+name), each of size XkbKeyNameLength.
+
+The current bounds check only validates the first name, allowing
+XkbAddGeomKeyAlias to potentially read uninitialized memory when
+accessing the second name at &wire[XkbKeyNameLength].
+
+To fix this, change the value to check to use 2 * XkbKeyNameLength to
+validate the bounds.
+
+CVE-2026-34000, ZDI-CAN-28679
+
+This vulnerability was discovered by:
+Jan-Niklas Sohn working with TrendAI Zero Day Initiative
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit 81b6a34f90b28c32ad499a78a4f391b7c06daea2)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2177>
+---
+ xkb/xkb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 65efa69e1..f67268e1a 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -5602,7 +5602,7 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client)
+     }
+ 
+     for (i = 0; i < req->nKeyAliases; i++) {
+-        if (!_XkbCheckRequestBounds(client, req, wire, wire + XkbKeyNameLength))
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 2 * XkbKeyNameLength))
+                 return BadLength;
+ 
+         if (XkbAddGeomKeyAlias(geom, &wire[XkbKeyNameLength], wire) == NULL)
+-- 
+2.53.0
+

diff --git a/0002-xkb-allocate-names-keys-to-MAP_LENGTH-in-XkbAllocNam.patch b/0002-xkb-allocate-names-keys-to-MAP_LENGTH-in-XkbAllocNam.patch
new file mode 100644
index 0000000..d2a03d0
--- /dev/null
+++ b/0002-xkb-allocate-names-keys-to-MAP_LENGTH-in-XkbAllocNam.patch
@@ -0,0 +1,55 @@
+From 689166530c8b974c9f488ba49f6b8dfa99b849e0 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:04:03 +1000
+Subject: [PATCH xserver 02/12] xkb: allocate names->keys to MAP_LENGTH in
+ XkbAllocNames
+
+Commit a3171732d ("xkb: Always use MAP_LENGTH keymap size") converted
+most XKB allocation functions to use MAP_LENGTH (256) instead of
+max_key_code + 1. It also removed the per-array reallocarray() calls in
+XkbChangeKeycodeRange(), replacing them with a memset up to MAP_LENGTH.
+However, XkbAllocNames() was missed and still allocates names->keys to
+max_key_code + 1.
+
+When a keycodes component with max_key_code < 255 is loaded (e.g.
+sun(type6) with max_key_code=132) and then a SetMap request extends
+maxKeyCode to 255, XkbChangeKeycodeRange() memsets names->keys from
+max_key_code to MAP_LENGTH-1, writing past the undersized allocation.
+
+Fix by allocating names->keys to MAP_LENGTH, consistent with all other
+keymap arrays after a3171732d.
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31941
+
+CVE-2026-93520
+
+Fixes: a3171732da50 ("xkb: Always use MAP_LENGTH keymap size")
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit b941a473e06f26a407a9adb15759be79f7418e86)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ xkb/XKBAlloc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
+index dced42eeb..314a858dd 100644
+--- a/xkb/XKBAlloc.c
++++ b/xkb/XKBAlloc.c
+@@ -148,7 +148,7 @@ XkbAllocNames(XkbDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
+             (!XkbIsLegalKeycode(xkb->max_key_code)) ||
+             (xkb->max_key_code < xkb->min_key_code))
+             return BadValue;
+-        names->keys = calloc((xkb->max_key_code + 1), sizeof(XkbKeyNameRec));
++        names->keys = calloc(MAP_LENGTH, sizeof(XkbKeyNameRec));
+         if (names->keys == NULL)
+             return BadAlloc;
+     }
+-- 
+2.56.0
+

diff --git a/0003-dix-Fix-builds-with-meson-Dxace-false-Dwerror-true.patch b/0003-dix-Fix-builds-with-meson-Dxace-false-Dwerror-true.patch
new file mode 100644
index 0000000..4d9c23c
--- /dev/null
+++ b/0003-dix-Fix-builds-with-meson-Dxace-false-Dwerror-true.patch
@@ -0,0 +1,57 @@
+From 2ec131e3fa033ab2c70b46da961f6c3bcc3a4959 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue, 19 Aug 2025 18:52:16 -0700
+Subject: [PATCH xserver 03/31] dix: Fix builds with meson -Dxace=false
+ -Dwerror=true
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CI meson-disable-options builds were failing with:
+../dix/events.c: In function ‘CoreEnterLeaveEvent’:
+../dix/events.c:4723:19: error: unused variable ‘client’
+ [-Werror=unused-variable]
+ 4723 |         ClientPtr client = grab ? rClient(grab) : wClient(pWin);
+      |                   ^~~~~~
+../dix/events.c: In function ‘CoreFocusEvent’:
+../dix/events.c:4834:19: error: unused variable ‘client’
+ [-Werror=unused-variable]
+ 4834 |         ClientPtr client = wClient(pWin);
+      |                   ^~~~~~
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 6611caf828af4833d59cd41f8c64a910f1edcac9)
+(cherry picked from commit 878d73e31296f59fa70c9ac56508d51f140bb9ee)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ dix/events.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/dix/events.c b/dix/events.c
+index d21e1894c..8d8c4017b 100644
+--- a/dix/events.c
++++ b/dix/events.c
+@@ -4735,7 +4735,9 @@ CoreEnterLeaveEvent(DeviceIntPtr mouse,
+         xKeymapEvent ke = {
+             .type = KeymapNotify
+         };
++#ifdef XACE
+         ClientPtr client = grab ? rClient(grab) : wClient(pWin);
++#endif
+         int rc;
+ 
+         rc = XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess);
+@@ -4846,7 +4848,9 @@ CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
+         xKeymapEvent ke = {
+             .type = KeymapNotify
+         };
++#ifdef XACE
+         ClientPtr client = wClient(pWin);
++#endif
+         int rc;
+ 
+         rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess);
+-- 
+2.54.0
+

diff --git a/0003-glamor-reject-fonts-with-per-glyph-metrics-exceeding.patch b/0003-glamor-reject-fonts-with-per-glyph-metrics-exceeding.patch
new file mode 100644
index 0000000..9d75eea
--- /dev/null
+++ b/0003-glamor-reject-fonts-with-per-glyph-metrics-exceeding.patch
@@ -0,0 +1,93 @@
+From 28bf4097755f0f9e45e2cfc097e2bb49a714c227 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sun, 31 May 2026 19:37:01 +1000
+Subject: [PATCH xserver 3/3] glamor: reject fonts with per-glyph metrics
+ exceeding maxbounds
+
+glamor_font_get() computes the atlas slot size from the font's declared
+maxbounds, but copies each glyph's bitmap using the per-glyph metrics
+(GLYPHHEIGHTPIXELS/GLYPHWIDTHBYTES macros). When a malicious PCF font
+has per-glyph metrics exceeding maxbounds, the memcpy writes past the
+heap-allocated atlas buffer. Negative per-glyph metrics are even worse:
+the loop counter wraps to ~4 billion iterations (via unsigned cast) or
+memcpy's size parameter wraps to SIZE_MAX.
+
+The PCF parser in libXfont2 does not recompute maxbounds from per-glyph
+data (only the BDF parser does), so the file's declared maxbounds values
+are trusted as-is.
+
+Reject fonts where any per-glyph metric is negative or exceeds the
+atlas slot size, falling back to software rendering which uses per-glyph
+metrics directly without an atlas.
+
+This vulnerability was discovered by:
+Anonymous working with Trend Micro Zero Day Initiative
+
+CVE-2026-55999/ZDI-CAN-30498
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit fbf7bac22e2c6bd627fb042742a23318263edae1)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2251>
+---
+ glamor/glamor_font.c | 30 +++++++++++++++++++++++++++---
+ 1 file changed, 27 insertions(+), 3 deletions(-)
+
+diff --git a/glamor/glamor_font.c b/glamor/glamor_font.c
+index c689455c9..9c4941b05 100644
+--- a/glamor/glamor_font.c
++++ b/glamor/glamor_font.c
+@@ -71,6 +71,9 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
+     glyph_width_pixels = font->info.maxbounds.rightSideBearing - font->info.minbounds.leftSideBearing;
+     glyph_height = font->info.maxbounds.ascent + font->info.maxbounds.descent;
+ 
++    if (glyph_width_pixels <= 0 || glyph_height <= 0)
++        return NULL;
++
+     glyph_width_bytes = (glyph_width_pixels + 7) >> 3;
+ 
+     glamor_font->glyph_width_pixels = glyph_width_pixels;
+@@ -130,7 +133,28 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
+             if (count) {
+                 char *dst;
+                 char *src = glyph->bits;
+-                unsigned y;
++                int gw = GLYPHWIDTHBYTES(glyph);
++                int gh = GLYPHHEIGHTPIXELS(glyph);
++
++                /* Reject fonts where any per-glyph metric is negative
++                 * or exceeds the atlas slot size derived from maxbounds.
++                 * The PCF parser in libXfont2 does not recompute
++                 * maxbounds from per-glyph data, so a crafted PCF file
++                 * can violate the maxbounds invariant.
++                 *
++                 * gw is passed as size_t to memcpy and a negative value
++                 * would thus result in OOB access.
++                 *
++                 * Returning NULL makes glamor fall back to software
++                 * rendering.
++                 */
++                if (gw < 0 || gh < 0 ||
++                    gw > glyph_width_bytes || gh > glyph_height) {
++                    glDeleteTextures(1, &glamor_font->texture_id);
++                    glamor_font->texture_id = 0;
++                    free(bits);
++                    return NULL;
++                }
+ 
+                 dst = bits;
+                 /* get offset of start of first row */
+@@ -139,8 +163,8 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
+                 dst += (row & 1) ? glamor_font->row_width : 0;
+ 
+                 dst += col * glyph_width_bytes;
+-                for (y = 0; y < GLYPHHEIGHTPIXELS(glyph); y++) {
+-                    memcpy(dst, src, GLYPHWIDTHBYTES(glyph));
++                for (int y = 0; y < gh; y++) {
++                    memcpy(dst, src, gw);
+                     dst += overall_width;
+                     src += GLYPHWIDTHBYTESPADDED(glyph);
+                 }
+-- 
+2.55.0
+

diff --git a/0003-miext-sync-Fix-use-after-free-in-miSyncTriggerFence.patch b/0003-miext-sync-Fix-use-after-free-in-miSyncTriggerFence.patch
new file mode 100644
index 0000000..d7c9081
--- /dev/null
+++ b/0003-miext-sync-Fix-use-after-free-in-miSyncTriggerFence.patch
@@ -0,0 +1,103 @@
+From d90a480fabafb53630b1bc60ce77e65d379cd572 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Wed, 18 Feb 2026 16:23:23 +0100
+Subject: [PATCH xserver 3/6] miext/sync: Fix use-after-free in
+ miSyncTriggerFence()
+
+As reported by valgrind:
+
+  == Invalid read of size 8
+  ==    at 0x568C14: miSyncTriggerFence (misync.c:140)
+  ==    by 0x540688: ProcSyncTriggerFence (sync.c:1957)
+  ==    by 0x540CCC: ProcSyncDispatch (sync.c:2152)
+  ==    by 0x4A28C5: Dispatch (dispatch.c:553)
+  ==    by 0x4B0B24: dix_main (main.c:274)
+  ==    by 0x42915E: main (stubmain.c:34)
+  ==  Address 0x17e35488 is 8 bytes inside a block of size 16 free'd
+  ==    at 0x4843E43: free (vg_replace_malloc.c:990)
+  ==    by 0x53D683: SyncDeleteTriggerFromSyncObject (sync.c:169)
+  ==    by 0x53F14D: FreeAwait (sync.c:1208)
+  ==    by 0x4DFB06: doFreeResource (resource.c:888)
+  ==    by 0x4DFC59: FreeResource (resource.c:918)
+  ==    by 0x53E349: SyncAwaitTriggerFired (sync.c:701)
+  ==    by 0x568C52: miSyncTriggerFence (misync.c:142)
+  ==    by 0x540688: ProcSyncTriggerFence (sync.c:1957)
+  ==    by 0x540CCC: ProcSyncDispatch (sync.c:2152)
+  ==    by 0x4A28C5: Dispatch (dispatch.c:553)
+  ==    by 0x4B0B24: dix_main (main.c:274)
+  ==    by 0x42915E: main (stubmain.c:34)
+  ==  Block was alloc'd at
+  ==    at 0x4840B26: malloc (vg_replace_malloc.c:447)
+  ==    by 0x5E50E1: XNFalloc (utils.c:1129)
+  ==    by 0x53D772: SyncAddTriggerToSyncObject (sync.c:206)
+  ==    by 0x53DCA8: SyncInitTrigger (sync.c:414)
+  ==    by 0x5409C7: ProcSyncAwaitFence (sync.c:2089)
+  ==    by 0x540D04: ProcSyncDispatch (sync.c:2160)
+  ==    by 0x4A28C5: Dispatch (dispatch.c:553)
+  ==    by 0x4B0B24: dix_main (main.c:274)
+  ==    by 0x42915E: main (stubmain.c:34)
+
+When walking the list of fences to trigger, miSyncTriggerFence() may
+call TriggerFence() for the current trigger, which end up calling the
+function SyncAwaitTriggerFired().
+
+SyncAwaitTriggerFired() frees the entire await resource, which removes
+all triggers from that await - including pNext which may be another
+trigger from the same await attached to the same fence.
+
+On the next iteration, ptl = pNext points to freed memory...
+
+To avoid the issue, we need to restart the iteration from the beginning
+of the list each time a trigger fires, since the callback can modify the
+list.
+
+CVE-2026-34001, ZDI-CAN-28706
+
+This vulnerability was discovered by:
+Jan-Niklas Sohn working with TrendAI Zero Day Initiative
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit f19ab94ba9c891d801231654267556dc7f32b5e0)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2177>
+---
+ miext/sync/misync.c | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/miext/sync/misync.c b/miext/sync/misync.c
+index 48234ef8a..77b4659c1 100644
+--- a/miext/sync/misync.c
++++ b/miext/sync/misync.c
+@@ -131,16 +131,22 @@ miSyncDestroyFence(SyncFence * pFence)
+ void
+ miSyncTriggerFence(SyncFence * pFence)
+ {
+-    SyncTriggerList *ptl, *pNext;
++    SyncTriggerList *ptl;
++    Bool triggered;
+ 
+     pFence->funcs.SetTriggered(pFence);
+ 
+     /* run through triggers to see if any fired */
+-    for (ptl = pFence->sync.pTriglist; ptl; ptl = pNext) {
+-        pNext = ptl->next;
+-        if ((*ptl->pTrigger->CheckTrigger) (ptl->pTrigger, 0))
+-            (*ptl->pTrigger->TriggerFired) (ptl->pTrigger);
+-    }
++    do {
++        triggered = FALSE;
++        for (ptl = pFence->sync.pTriglist; ptl; ptl = ptl->next) {
++            if ((*ptl->pTrigger->CheckTrigger) (ptl->pTrigger, 0)) {
++                (*ptl->pTrigger->TriggerFired) (ptl->pTrigger);
++                triggered = TRUE;
++                break;
++            }
++        }
++    } while (triggered);
+ }
+ 
+ SyncScreenFuncsPtr
+-- 
+2.53.0
+

diff --git a/0003-xkb-reject-key-types-with-num_levels-exceeding-XkbMa.patch b/0003-xkb-reject-key-types-with-num_levels-exceeding-XkbMa.patch
new file mode 100644
index 0000000..33e0bbe
--- /dev/null
+++ b/0003-xkb-reject-key-types-with-num_levels-exceeding-XkbMa.patch
@@ -0,0 +1,50 @@
+From 72036644746c47a09eec106c367f186713fd606d Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 20 Apr 2026 11:17:41 +1000
+Subject: [PATCH xserver 3/7] xkb: reject key types with num_levels exceeding
+ XkbMaxShiftLevel
+
+CheckKeyTypes validates incoming key type definitions from XkbSetMap
+requests but does not enforce an upper bound on numLevels. A client can set
+numLevels up to 255 on a non-canonical key type, which is stored in the
+server's type table.
+
+When ChangeKeyboardMapping later triggers XkbUpdateKeyTypesFromCore, the
+function XkbKeyTypesForCoreSymbols computes groupsWidth from num_levels and
+uses the XKB_OFFSET(g, l) = (g * groupsWidth) + l macro to index into
+tsyms[], a stack-allocated buffer of XkbMaxSymsPerKey (252) entries. With
+num_levels=255, groupsWidth=255, and indices reach up to 3*255+254 = 1019,
+overflowing the 252-element stack buffer by 767 KeySym-sized entries.
+
+Fix by rejecting numLevels values greater than XkbMaxShiftLevel (63) in
+CheckKeyTypes, alongside the existing lower-bound check for numLevels < 1.
+
+This vulnerability was discovered by:
+Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-30160
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 543e108516428fc8c3bea91d6563ad266f9a801e)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2230>
+---
+ xkb/xkb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index c389448e4..b5d601dcb 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1647,7 +1647,7 @@ CheckKeyTypes(ClientPtr client,
+         }
+         n = i + req->firstType;
+         width = wire->numLevels;
+-        if (width < 1) {
++        if (width < 1 || width > XkbMaxShiftLevel) {
+             *nMapsRtrn = _XkbErrCode3(0x04, n, width);
+             return 0;
+         }
+-- 
+2.54.0
+

diff --git a/0003-xkb-widen-size_syms-num_syms-size_acts-num_acts-to-u.patch b/0003-xkb-widen-size_syms-num_syms-size_acts-num_acts-to-u.patch
new file mode 100644
index 0000000..4f925d6
--- /dev/null
+++ b/0003-xkb-widen-size_syms-num_syms-size_acts-num_acts-to-u.patch
@@ -0,0 +1,78 @@
+From 1b9a4a2221e6a8ff581868b510e04652d024dfb4 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 16:57:38 +1000
+Subject: [PATCH xserver 03/12] xkb: widen size_syms, num_syms, size_acts,
+ num_acts to unsigned int
+
+Fields in XkbClientMapRec and XkbServerMapRec that denote size/num
+and are unsigned short can result in truncations. For example
+when XkbResizeKeyType() computes the new size_syms value as
+(nTotal * 15) / 10, the result may be implicitly truncated to 16
+bits on assignment. This causes an undersized calloc allocation, and the
+subsequent copy loop writes based on the actual (untruncated) key count,
+resulting in a heap buffer overflow. A similar truncation may happen
+in XkbResizeKeySyms() and XkbResizeKeyActions().
+
+Widen the fields from unsigned short to unsigned int. These are internal
+server structures, not wire protocol types.
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31834
+
+CVE-2026-93518
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 89101a6c6618f543d7502f2077c7ef1a507af256)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ include/xkbstr.h | 8 ++++----
+ xkb/XKBMAlloc.c  | 3 ++-
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/include/xkbstr.h b/include/xkbstr.h
+index 749f1f26e..45a15f376 100644
+--- a/include/xkbstr.h
++++ b/include/xkbstr.h
+@@ -312,8 +312,8 @@ typedef struct _XkbControls {
+                                   XkbAX_NeedOption((c), (w)))
+ 
+ typedef struct _XkbServerMapRec {
+-    unsigned short num_acts;
+-    unsigned short size_acts;
++    unsigned int num_acts;
++    unsigned int size_acts;
+     XkbAction *acts;
+ 
+     XkbBehavior *behaviors;
+@@ -346,8 +346,8 @@ typedef struct _XkbClientMapRec {
+     unsigned char num_types;
+     XkbKeyTypePtr types;
+ 
+-    unsigned short size_syms;
+-    unsigned short num_syms;
++    unsigned int size_syms;
++    unsigned int num_syms;
+     KeySym *syms;
+     XkbSymMapPtr key_sym_map;
+ 
+diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c
+index 78e597f3d..8f8ac28fa 100644
+--- a/xkb/XKBMAlloc.c
++++ b/xkb/XKBMAlloc.c
+@@ -385,7 +385,8 @@ XkbResizeKeyType(XkbDescPtr xkb,
+         }
+         if (nResize > 0) {
+             int nextMatch;
+-
++            if (nTotal > INT_MAX / 15)
++                return BadAlloc;
+             xkb->map->size_syms = (nTotal * 15) / 10;
+             newSyms = calloc(xkb->map->size_syms, sizeof(KeySym));
+             if (newSyms == NULL)
+-- 
+2.56.0
+

diff --git a/0004-meson-don-t-build-xselinux-if-xace-is-disabled.patch b/0004-meson-don-t-build-xselinux-if-xace-is-disabled.patch
new file mode 100644
index 0000000..9194743
--- /dev/null
+++ b/0004-meson-don-t-build-xselinux-if-xace-is-disabled.patch
@@ -0,0 +1,43 @@
+From 4ba490c26b027c704470f1159c95b9dadf3c0f0c Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed, 20 Aug 2025 10:58:39 -0700
+Subject: [PATCH xserver 04/31] meson: don't build xselinux if xace is disabled
+
+xselinux requires xace to build
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 7b15321b3b0e40244af1488f4ee1cd4453a78bc8)
+(cherry picked from commit f468122d8df385ddac65022fcdbbf015896c22ad)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ meson.build | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 2e62f66a9..d48733938 100644
+--- a/meson.build
++++ b/meson.build
+@@ -452,7 +452,7 @@ if get_option('xselinux') != 'false'
+     if get_option('xselinux') == 'true'
+         build_xselinux = true
+     else
+-        build_xselinux = dep_selinux.found() and dep_audit.found()
++        build_xselinux = dep_selinux.found() and dep_audit.found() and build_xace
+     endif
+ 
+     if build_xselinux
+@@ -460,6 +460,10 @@ if get_option('xselinux') != 'false'
+         common_dep += dep_audit
+     endif
+ endif
++if build_xselinux and not build_xace
++    error('cannot build SELinux extension without X-ACE')
++endif
++
+ 
+ socket_dep = []
+ if host_machine.system() == 'windows'
+-- 
+2.54.0
+

diff --git a/0004-xkb-Fix-out-of-bounds-read-in-CheckModifierMap.patch b/0004-xkb-Fix-out-of-bounds-read-in-CheckModifierMap.patch
new file mode 100644
index 0000000..6a1fe34
--- /dev/null
+++ b/0004-xkb-Fix-out-of-bounds-read-in-CheckModifierMap.patch
@@ -0,0 +1,91 @@
+From a40b41497fc73d529dcc763f0907ee9ae60eb678 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Wed, 18 Feb 2026 17:02:09 +0100
+Subject: [PATCH xserver 4/6] xkb: Fix out-of-bounds read in CheckModifierMap()
+
+As reported by valgrind:
+
+  == Conditional jump or move depends on uninitialised value(s)
+  ==    at 0x547E5B: CheckModifierMap (xkb.c:1972)
+  ==    by 0x54A086: _XkbSetMapChecks (xkb.c:2574)
+  ==    by 0x54A845: ProcXkbSetMap (xkb.c:2741)
+  ==    by 0x556EF4: ProcXkbDispatch (xkb.c:7048)
+  ==    by 0x454A8C: Dispatch (dispatch.c:553)
+  ==    by 0x462CEB: dix_main (main.c:274)
+  ==    by 0x405EA7: main (stubmain.c:34)
+  ==  Uninitialised value was created by a heap allocation
+  ==    at 0x4840B26: malloc (vg_replace_malloc.c:447)
+  ==    by 0x592D5A: AllocateInputBuffer (io.c:981)
+  ==    by 0x591F77: InsertFakeRequest (io.c:516)
+  ==    by 0x45CA27: NextAvailableClient (dispatch.c:3629)
+  ==    by 0x58FA81: AllocNewConnection (connection.c:628)
+  ==    by 0x58FC70: EstablishNewConnections (connection.c:692)
+  ==    by 0x58FFAA: HandleNotifyFd (connection.c:809)
+  ==    by 0x593F42: ospoll_wait (ospoll.c:660)
+  ==    by 0x58B9B6: WaitForSomething (WaitFor.c:208)
+  ==    by 0x4548AC: Dispatch (dispatch.c:493)
+  ==    by 0x462CEB: dix_main (main.c:274)
+  ==    by 0x405EA7: main (stubmain.c:34)
+
+The issue is that the loop in CheckModifierMap() reads from wire without
+verifying that the data is within the request bounds.
+
+The req->totalModMapKeys value could exceed the actual data provided,
+causing reads of uninitialized memory.
+
+To fix that issue, we add a bounds check using _XkbCheckRequestBounds,
+but for that, we need to also pass a ClientPtr parameter, which is not
+a problem since CheckModifierMap() is a private, static function.
+
+CVE-2026-34002, ZDI-CAN-28737
+
+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 f056ce1cc96ed9261052c31524162c78e458f98c)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2177>
+---
+ xkb/xkb.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index f67268e1a..ae32036a7 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1939,8 +1939,8 @@ CheckKeyExplicit(XkbDescPtr xkb,
+ }
+ 
+ static int
+-CheckModifierMap(XkbDescPtr xkb, xkbSetMapReq * req, CARD8 **wireRtrn,
+-                 int *errRtrn)
++CheckModifierMap(ClientPtr client, XkbDescPtr xkb, xkbSetMapReq * req,
++                 CARD8 **wireRtrn, int *errRtrn)
+ {
+     register CARD8 *wire = *wireRtrn;
+     CARD8 *start;
+@@ -1964,6 +1964,10 @@ CheckModifierMap(XkbDescPtr xkb, xkbSetMapReq * req, CARD8 **wireRtrn,
+     }
+     start = wire;
+     for (i = 0; i < req->totalModMapKeys; i++, wire += 2) {
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 2)) {
++            *errRtrn = _XkbErrCode3(0x64, req->totalModMapKeys, i);
++            return 0;
++        }
+         if ((wire[0] < first) || (wire[0] > last)) {
+             *errRtrn = _XkbErrCode4(0x63, first, last, wire[0]);
+             return 0;
+@@ -2566,7 +2570,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
+         return BadValue;
+     }
+     if ((req->present & XkbModifierMapMask) &&
+-        (!CheckModifierMap(xkb, req, (CARD8 **) &values, &error))) {
++        (!CheckModifierMap(client, xkb, req, (CARD8 **) &values, &error))) {
+         client->errorValue = error;
+         return BadValue;
+     }
+-- 
+2.53.0
+

diff --git a/0004-xkb-clamp-nMaps-to-mapWidths-buffer-size-in-CheckKey.patch b/0004-xkb-clamp-nMaps-to-mapWidths-buffer-size-in-CheckKey.patch
new file mode 100644
index 0000000..b8ff611
--- /dev/null
+++ b/0004-xkb-clamp-nMaps-to-mapWidths-buffer-size-in-CheckKey.patch
@@ -0,0 +1,53 @@
+From cb0e17cc7890d41bfee39f5bfcfeec521b0d513d Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 20 Apr 2026 11:18:13 +1000
+Subject: [PATCH xserver 4/7] xkb: clamp nMaps to mapWidths buffer size in
+ CheckKeyTypes
+
+CheckKeyTypes computes nMaps = firstType + nTypes from client-controlled
+request fields when XkbSetMapResizeTypes is set. This value is used to
+index mapWidths[], a stack-allocated CARD8 array of XkbMaxLegalKeyCode + 1
+(256) elements. No upper bound is enforced on nMaps.
+
+An attacker can first send SetMap(firstType=0, nTypes=255, ResizeTypes) to
+set the server's num_types to 255, then send SetMap(firstType=255,
+nTypes=10, ResizeTypes). The firstType > num_types check passes because
+255 > 255 is false (the check uses > rather than >=). nMaps is then
+computed as 265, and the loop writes mapWidths[255..264], overflowing 9
+bytes past the stack buffer into adjacent stack variables (symsPerKey[]).
+
+Fix by rejecting requests where firstType + nTypes would exceed the
+mapWidths buffer size (XkbMaxLegalKeyCode + 1).
+
+This vulnerability was discovered by:
+Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-30161
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 867b59b33bee669cb412f1314e47c52eacf6e00b)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2230>
+---
+ xkb/xkb.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index b5d601dcb..ae6a4c09e 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1616,6 +1616,11 @@ CheckKeyTypes(ClientPtr client,
+             *nMapsRtrn = _XkbErrCode4(0x02, req->firstType, req->nTypes, 4);
+             return 0;
+         }
++        if (nMaps > XkbMaxLegalKeyCode + 1) {
++            *nMapsRtrn = _XkbErrCode4(0x02, req->firstType, req->nTypes,
++                                      XkbMaxLegalKeyCode + 1);
++            return 0;
++        }
+     }
+     else if (req->present & XkbKeyTypesMask) {
+         nMaps = xkb->map->num_types;
+-- 
+2.54.0
+

diff --git a/0004-xkb-fix-CheckKeySyms-overwriting-request-range-symsP.patch b/0004-xkb-fix-CheckKeySyms-overwriting-request-range-symsP.patch
new file mode 100644
index 0000000..9e4fed6
--- /dev/null
+++ b/0004-xkb-fix-CheckKeySyms-overwriting-request-range-symsP.patch
@@ -0,0 +1,62 @@
+From 21d57a9da3e9644a6d0c0d25669dfd0ec8af4522 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 3 Sep 2026 14:55:27 +1000
+Subject: [PATCH xserver 04/12] xkb: fix CheckKeySyms overwriting request-range
+ symsPerKey entries
+
+CheckKeySyms() has two loops: the first processes keys in the SetMap
+request range, the second fills in any missing keys from the existing
+map.
+
+The indexing between the two was inconsistent: the first loop
+uses a zero-based index + req->firstKeySym, the second loop used it just
+as zero-based index.
+
+Example:
+   req->firstKeySym = 50
+   req->nKeySyms = 10
+
+  i goes from 0 to 10,
+  loop 1 checks [50, 60), changes the width but finishes with i at 10.
+  loop 2 then runs over [10, 255(, copying the old keymap width
+
+The second loop overwrites the new widths with the width of the
+existing keymap. The subsequent SetKeySyms worked on the new width
+and may write fewer actions than the map width.
+
+A subsequent XkbGetMap request would then read XkbKeyNumActions()
+entries (derived from the new wider key_sym_map.width) from the shorter
+action allocation, causing an out-of-bounds heap read. The overread
+bytes would be copied into the GetMap reply and sent back to the client,
+producing a bounded heap information disclosure.
+
+This vulnerability was discovered by:
+  WONJOON HWANG (@joon1337) working with TrendAI Zero Day Initiative
+
+ZDI-CAN-32408
+
+CVE-2026-93524
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit cea71d0273e4d5092aa9c6a8a770734c8935c02e)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ xkb/xkb.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 3f32ff9af..72425d241 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1808,6 +1808,7 @@ CheckKeySyms(ClientPtr client,
+         wire = (xkbSymMapWireDesc *) &pSyms[wire->nSyms];
+     }
+ 
++    i = req->firstKeySym + req->nKeySyms;
+     map = &xkb->map->key_sym_map[i];
+     for (; i <= (unsigned) xkb->max_key_code; i++, map++) {
+         register int g, nG, w;
+-- 
+2.56.0
+

diff --git a/0005-glx-fix-reversed-length-check-in-ChangeDrawableAttri.patch b/0005-glx-fix-reversed-length-check-in-ChangeDrawableAttri.patch
new file mode 100644
index 0000000..69b9b4d
--- /dev/null
+++ b/0005-glx-fix-reversed-length-check-in-ChangeDrawableAttri.patch
@@ -0,0 +1,154 @@
+From 901da57abfde6bf2ae33859c2dd47b45d6dd5871 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 20 Apr 2026 11:18:48 +1000
+Subject: [PATCH xserver 5/7] glx: fix reversed length check in
+ ChangeDrawableAttributes
+
+The request length validation in __glXDisp_ChangeDrawableAttributes and
+__glXDispSwap_ChangeDrawableAttributes uses the wrong comparison direction.
+The check tests whether the computed request size is LESS THAN
+client->req_len, but should test whether it is GREATER THAN. With the
+reversed operator, an undersized request (where numAttribs claims more
+attribute pairs than the request actually contains) passes validation.
+
+DoChangeDrawableAttributes then iterates numAttribs attribute pairs starting
+from the end of the request header, reading past the actual request data
+into adjacent memory. This is an out-of-bounds read that can also cause
+an out-of-bounds write when a GLX_EVENT_MASK attribute key is found in the
+overread data and its corresponding value is written to pGlxDraw->eventMask.
+
+This patch effectively reverts commit 402b329c3aa8 ("glx: Work around
+wrong request lengths sent by mesa"). This was fixed in mesa commit
+4324d6fdfbba1 in 2011 (mesa 7.11).
+
+Fixes: 402b329c3aa8 ("glx: Work around wrong request lengths sent by mesa")
+
+This vulnerability was discovered by:
+Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-30165
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 6d459e4daf715bea8abdafa8fb130be2f8a1d145)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2230>
+---
+ glx/glxcmds.c     | 21 +++++----------------
+ glx/glxcmdsswap.c | 12 +++++-------
+ 2 files changed, 10 insertions(+), 23 deletions(-)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index 1e46d0c72..8a13e34b5 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -1144,8 +1144,7 @@ __glXDisp_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
+     ClientPtr client = cl->client;
+     xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc;
+ 
+-    /* work around mesa bug, don't use REQUEST_SIZE_MATCH */
+-    REQUEST_AT_LEAST_SIZE(xGLXGetFBConfigsSGIXReq);
++    REQUEST_SIZE_MATCH(xGLXGetFBConfigsSGIXReq);
+     return DoGetFBConfigs(cl, req->screen);
+ }
+ 
+@@ -1366,9 +1365,7 @@ __glXDisp_DestroyPixmap(__GLXclientState * cl, GLbyte * pc)
+     ClientPtr client = cl->client;
+     xGLXDestroyPixmapReq *req = (xGLXDestroyPixmapReq *) pc;
+ 
+-    /* should be REQUEST_SIZE_MATCH, but mesa's glXDestroyPixmap used to set
+-     * length to 3 instead of 2 */
+-    REQUEST_AT_LEAST_SIZE(xGLXDestroyPixmapReq);
++    REQUEST_SIZE_MATCH(xGLXDestroyPixmapReq);
+ 
+     return DoDestroyDrawable(cl, req->glxpixmap, GLX_DRAWABLE_PIXMAP);
+ }
+@@ -1524,14 +1521,8 @@ __glXDisp_ChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
+         client->errorValue = req->numAttribs;
+         return BadValue;
+     }
+-#if 0
+-    /* mesa sends an additional 8 bytes */
++
+     REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesReq, req->numAttribs << 3);
+-#else
+-    if (((sizeof(xGLXChangeDrawableAttributesReq) +
+-          (req->numAttribs << 3)) >> 2) < client->req_len)
+-        return BadLength;
+-#endif
+ 
+     return DoChangeDrawableAttributes(cl->client, req->drawable,
+                                       req->numAttribs, (CARD32 *) (req + 1));
+@@ -1598,8 +1589,7 @@ __glXDisp_DestroyWindow(__GLXclientState * cl, GLbyte * pc)
+     ClientPtr client = cl->client;
+     xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
+ 
+-    /* mesa's glXDestroyWindow used to set length to 3 instead of 2 */
+-    REQUEST_AT_LEAST_SIZE(xGLXDestroyWindowReq);
++    REQUEST_SIZE_MATCH(xGLXDestroyWindowReq);
+ 
+     return DoDestroyDrawable(cl, req->glxwindow, GLX_DRAWABLE_WINDOW);
+ }
+@@ -1960,8 +1950,7 @@ __glXDisp_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
+     ClientPtr client = cl->client;
+     xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc;
+ 
+-    /* this should be REQUEST_SIZE_MATCH, but mesa sends an additional 4 bytes */
+-    REQUEST_AT_LEAST_SIZE(xGLXGetDrawableAttributesReq);
++    REQUEST_SIZE_MATCH(xGLXGetDrawableAttributesReq);
+ 
+     return DoGetDrawableAttributes(cl, req->drawable);
+ }
+diff --git a/glx/glxcmdsswap.c b/glx/glxcmdsswap.c
+index 7d6674470..96382672a 100644
+--- a/glx/glxcmdsswap.c
++++ b/glx/glxcmdsswap.c
+@@ -235,7 +235,7 @@ __glXDispSwap_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
+ 
+     __GLX_DECLARE_SWAP_VARIABLES;
+ 
+-    REQUEST_AT_LEAST_SIZE(xGLXGetFBConfigsSGIXReq);
++    REQUEST_SIZE_MATCH(xGLXGetFBConfigsSGIXReq);
+ 
+     __GLX_SWAP_INT(&req->screen);
+     return __glXDisp_GetFBConfigsSGIX(cl, pc);
+@@ -327,7 +327,7 @@ __glXDispSwap_DestroyPixmap(__GLXclientState * cl, GLbyte * pc)
+ 
+     __GLX_DECLARE_SWAP_VARIABLES;
+ 
+-    REQUEST_AT_LEAST_SIZE(xGLXDestroyGLXPixmapReq);
++    REQUEST_SIZE_MATCH(xGLXDestroyGLXPixmapReq);
+ 
+     __GLX_SWAP_SHORT(&req->length);
+     __GLX_SWAP_INT(&req->glxpixmap);
+@@ -440,9 +440,7 @@ __glXDispSwap_ChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
+         client->errorValue = req->numAttribs;
+         return BadValue;
+     }
+-    if (((sizeof(xGLXChangeDrawableAttributesReq) +
+-          (req->numAttribs << 3)) >> 2) < client->req_len)
+-        return BadLength;
++    REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesReq, req->numAttribs << 3);
+ 
+     attribs = (CARD32 *) (req + 1);
+     __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1);
+@@ -514,7 +512,7 @@ __glXDispSwap_DestroyWindow(__GLXclientState * cl, GLbyte * pc)
+ 
+     __GLX_DECLARE_SWAP_VARIABLES;
+ 
+-    REQUEST_AT_LEAST_SIZE(xGLXDestroyWindowReq);
++    REQUEST_SIZE_MATCH(xGLXDestroyWindowReq);
+ 
+     __GLX_SWAP_INT(&req->glxwindow);
+ 
+@@ -723,7 +721,7 @@ __glXDispSwap_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
+ 
+     __GLX_DECLARE_SWAP_VARIABLES;
+ 
+-    REQUEST_AT_LEAST_SIZE(xGLXGetDrawableAttributesReq);
++    REQUEST_SIZE_MATCH(xGLXGetDrawableAttributesReq);
+ 
+     __GLX_SWAP_SHORT(&req->length);
+     __GLX_SWAP_INT(&req->drawable);
+-- 
+2.54.0
+

diff --git a/0005-randr-fix-size-and-offset-in-RRChangeProviderPropert.patch b/0005-randr-fix-size-and-offset-in-RRChangeProviderPropert.patch
new file mode 100644
index 0000000..7a0eeb2
--- /dev/null
+++ b/0005-randr-fix-size-and-offset-in-RRChangeProviderPropert.patch
@@ -0,0 +1,60 @@
+From a7ab1d9bd503833666c3f0d3a927b25af2c3931e Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:04:35 +1000
+Subject: [PATCH xserver 05/12] randr: fix size and offset in
+ RRChangeProviderProperty PrependMode
+
+RRChangeProviderProperty() has two bugs in the PropModePrepend case:
+
+1. new_value.size is set to 'len' (the new data length) instead of
+   'total_len' (len + prop_value->size), losing track of the existing
+   data. This also affects PropModeAppend.
+
+2. The old_data offset is computed using prop_value->size instead of
+   len. For PrependMode, the layout should be [new(len)][old(size)],
+   so old_data should start at len * size_in_bytes.
+
+These bugs are analogous to the ones fixed in RRChangeOutputProperty(),
+see commit 541ab2ecd41d ("Xi/randr: fix handling of PropModeAppend/Prepend").
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31944
+
+CVE-2026-93521
+
+Assisted-by: Claude:claude-opus-4-6
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit 5dc9efd5a199717b53f70b9c6cd336a522370e46)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ randr/rrproviderproperty.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c
+index 00e27556b..2d705f775 100644
+--- a/randr/rrproviderproperty.c
++++ b/randr/rrproviderproperty.c
+@@ -191,7 +191,7 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
+                 RRDestroyProviderProperty(prop);
+             return BadAlloc;
+         }
+-        new_value.size = len;
++        new_value.size = total_len;
+         new_value.type = type;
+         new_value.format = format;
+ 
+@@ -208,7 +208,7 @@ RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
+         case PropModePrepend:
+             new_data = new_value.data;
+             old_data = (void *) (((char *) new_value.data) +
+-                                  (prop_value->size * size_in_bytes));
++                                  (len * size_in_bytes));
+             break;
+         }
+         if (new_data)
+-- 
+2.56.0
+

diff --git a/0005-xkb-Add-additional-bound-checking-in-CheckKeyTypes.patch b/0005-xkb-Add-additional-bound-checking-in-CheckKeyTypes.patch
new file mode 100644
index 0000000..70e0b9d
--- /dev/null
+++ b/0005-xkb-Add-additional-bound-checking-in-CheckKeyTypes.patch
@@ -0,0 +1,112 @@
+From 38e8ae840c395e30f5046365f782183b0fb522b0 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Mon, 23 Feb 2026 15:52:49 +0100
+Subject: [PATCH xserver 5/6] xkb: Add additional bound checking in
+ CheckKeyTypes()
+
+The function CheckKeyTypes() will loop over the client's request but
+won't perform any additional bound checking to ensure that the data
+read remains within the request bounds.
+
+As a result, a specifically crafted request may cause CheckKeyTypes() to
+read past the request data, as reported by valgrind:
+
+  == Invalid read of size 2
+  ==    at 0x5A3D1D: CheckKeyTypes (xkb.c:1694)
+  ==    by 0x5A6A9C: _XkbSetMapChecks (xkb.c:2515)
+  ==    by 0x5A759E: ProcXkbSetMap (xkb.c:2736)
+  ==    by 0x5BF832: SProcXkbSetMap (xkbSwap.c:245)
+  ==    by 0x5C05ED: SProcXkbDispatch (xkbSwap.c:501)
+  ==    by 0x4A20DF: Dispatch (dispatch.c:551)
+  ==    by 0x4B03B4: dix_main (main.c:277)
+  ==    by 0x428941: main (stubmain.c:34)
+  ==  Address is 30 bytes after a block of size 28,672 in arena "client"
+  ==
+  == Invalid read of size 2
+  ==    at 0x5A3AB6: CheckKeyTypes (xkb.c:1669)
+  ==    by 0x5A6A9C: _XkbSetMapChecks (xkb.c:2515)
+  ==    by 0x5A759E: ProcXkbSetMap (xkb.c:2736)
+  ==    by 0x5BF832: SProcXkbSetMap (xkbSwap.c:245)
+  ==    by 0x5C05ED: SProcXkbDispatch (xkbSwap.c:501)
+  ==    by 0x4A20DF: Dispatch (dispatch.c:551)
+  ==    by 0x4B03B4: dix_main (main.c:277)
+  ==    by 0x428941: main (stubmain.c:34)
+  ==  Address is 2 bytes after a block of size 28,672 alloc'd
+  ==    at 0x4848897: realloc (vg_replace_malloc.c:1804)
+  ==    by 0x5E357A: ReadRequestFromClient (io.c:336)
+  ==    by 0x4A1FAB: Dispatch (dispatch.c:519)
+  ==    by 0x4B03B4: dix_main (main.c:277)
+  ==    by 0x428941: main (stubmain.c:34)
+  ==
+  == Invalid write of size 2
+  ==    at 0x5A3AD7: CheckKeyTypes (xkb.c:1669)
+  ==    by 0x5A6A9C: _XkbSetMapChecks (xkb.c:2515)
+  ==    by 0x5A759E: ProcXkbSetMap (xkb.c:2736)
+  ==    by 0x5BF832: SProcXkbSetMap (xkbSwap.c:245)
+  ==    by 0x5C05ED: SProcXkbDispatch (xkbSwap.c:501)
+  ==    by 0x4A20DF: Dispatch (dispatch.c:551)
+  ==    by 0x4B03B4: dix_main (main.c:277)
+  ==    by 0x428941: main (stubmain.c:34)
+  ==  Address is 2 bytes after a block of size 28,672 alloc'd
+  ==    at 0x4848897: realloc (vg_replace_malloc.c:1804)
+  ==    by 0x5E357A: ReadRequestFromClient (io.c:336)
+  ==    by 0x4A1FAB: Dispatch (dispatch.c:519)
+  ==    by 0x4B03B4: dix_main (main.c:277)
+  ==    by 0x428941: main (stubmain.c:34)
+  ==
+
+To avoid that issue, add additional bounds checking within the loops by
+calling _XkbCheckRequestBounds() and report an error if we are to read
+past the client's request.
+
+CVE-2026-34003, ZDI-CAN-28736
+
+This vulnerability was discovered by:
+Jan-Niklas Sohn working with TrendAI Zero Day Initiative
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit b85b00dd7b9eee05e3c12e7ad1fce4fc6671507b)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2177>
+---
+ xkb/xkb.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index ae32036a7..e90a5d7ba 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1638,6 +1638,10 @@ CheckKeyTypes(ClientPtr client,
+     for (i = 0; i < req->nTypes; i++) {
+         unsigned width;
+ 
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 1)) {
++            *nMapsRtrn = _XkbErrCode3(0x0b, req->nTypes, i);
++            return 0;
++        }
+         if (client->swapped && doswap) {
+             swaps(&wire->virtualMods);
+         }
+@@ -1663,7 +1667,18 @@ CheckKeyTypes(ClientPtr client,
+             xkbModsWireDesc *preWire;
+ 
+             mapWire = (xkbKTSetMapEntryWireDesc *) &wire[1];
++            if (!_XkbCheckRequestBounds(client, req, mapWire,
++                                        &mapWire[wire->nMapEntries])) {
++                *nMapsRtrn = _XkbErrCode3(0x0c, i, wire->nMapEntries);
++                return 0;
++            }
+             preWire = (xkbModsWireDesc *) &mapWire[wire->nMapEntries];
++            if (wire->preserve &&
++                !_XkbCheckRequestBounds(client, req, preWire,
++                                        &preWire[wire->nMapEntries])) {
++                *nMapsRtrn = _XkbErrCode3(0x0d, i, wire->nMapEntries);
++                return 0;
++            }
+             for (n = 0; n < wire->nMapEntries; n++) {
+                 if (client->swapped && doswap) {
+                     swaps(&mapWire[n].virtualMods);
+-- 
+2.53.0
+

diff --git a/0005-xwayland-fix-builds-with-xace-disabled.patch b/0005-xwayland-fix-builds-with-xace-disabled.patch
new file mode 100644
index 0000000..0581836
--- /dev/null
+++ b/0005-xwayland-fix-builds-with-xace-disabled.patch
@@ -0,0 +1,86 @@
+From 5feedb15a5ed819b9fc09f271ff7a3cc9a00a810 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed, 20 Aug 2025 13:15:17 -0700
+Subject: [PATCH xserver 05/31] xwayland: fix builds with xace disabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CI meson-disable-options builds were failing with:
+../hw/xwayland/xwayland-screen.c: In function ‘xwl_close_screen’:
+../hw/xwayland/xwayland-screen.c:246:5: error: implicit declaration of
+ function ‘XaceDeleteCallback’; did you mean ‘DeleteCallback’?
+ [-Werror=implicit-function-declaration]
+  246 |     XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen);
+      |     ^~~~~~~~~~~~~~~~~~
+      |     DeleteCallback
+
+../hw/xwayland/xwayland-screen.c:246:24: error: ‘XACE_PROPERTY_ACCESS’
+ undeclared (first use in this function)
+  246 |     XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen);
+      |                        ^~~~~~~~~~~~~~~~~~~~
+
+../hw/xwayland/xwayland-screen.c: In function ‘xwl_screen_init’:
+../hw/xwayland/xwayland-screen.c:1174:5: error: implicit declaration of
+ function ‘XaceRegisterCallback’ [-Werror=implicit-function-declaration]
+ 1174 |     XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen);
+      |     ^~~~~~~~~~~~~~~~~~~~
+
+../hw/xwayland/xwayland-screen.c:1174:26: error: ‘XACE_PROPERTY_ACCESS’
+ undeclared (first use in this function)
+ 1174 |     XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen);
+      |                          ^~~~~~~~~~~~~~~~~~~~
+
+Fixes: a07c2cda9 ("xwayland: Add an XACE property access handler")
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 48acd1ae7835c2e95c7f2db704b1f22dcba4efdd)
+(cherry picked from commit 3298b0a3e021efc99e4a7892ce4b176bc5e7d556)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ hw/xwayland/xwayland-screen.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c
+index 7ab9174ec..c83adda9f 100644
+--- a/hw/xwayland/xwayland-screen.c
++++ b/hw/xwayland/xwayland-screen.c
+@@ -181,6 +181,7 @@ xwl_property_callback(CallbackListPtr *pcbl, void *closure,
+         xwl_window_update_property(xwl_window, rec);
+ }
+ 
++#ifdef XACE
+ #define readOnlyPropertyAccessMask (DixReadAccess |\
+                                     DixGetAttrAccess |\
+                                     DixListPropAccess |\
+@@ -207,6 +208,7 @@ xwl_access_property_callback(CallbackListPtr *pcbl, void *closure,
+ }
+ 
+ #undef readOnlyPropertyAccessMask
++#endif /* XACE */
+ 
+ static void
+ xwl_root_window_finalized_callback(CallbackListPtr *pcbl,
+@@ -237,7 +239,9 @@ xwl_close_screen(ScreenPtr screen)
+     xwl_dmabuf_feedback_destroy(&xwl_screen->default_feedback);
+ #endif
+     DeleteCallback(&PropertyStateCallback, xwl_property_callback, screen);
++#ifdef XACE
+     XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen);
++#endif
+ 
+     xorg_list_for_each_entry_safe(xwl_output, next_xwl_output,
+                                   &xwl_screen->output_list, link)
+@@ -1168,7 +1172,9 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
+ 
+     AddCallback(&PropertyStateCallback, xwl_property_callback, pScreen);
+     AddCallback(&RootWindowFinalizeCallback, xwl_root_window_finalized_callback, pScreen);
++#ifdef XACE
+     XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen);
++#endif
+ 
+     xwl_screen_setup_custom_vector(xwl_screen);
+ 
+-- 
+2.54.0
+

diff --git a/0006-Xi-validate-modifier-values-in-ProcXIPassiveUngrabDe.patch b/0006-Xi-validate-modifier-values-in-ProcXIPassiveUngrabDe.patch
new file mode 100644
index 0000000..13c0c58
--- /dev/null
+++ b/0006-Xi-validate-modifier-values-in-ProcXIPassiveUngrabDe.patch
@@ -0,0 +1,68 @@
+From 79a4b5a707b2e88019d83f099a7cff6058edcd04 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:04:20 +1000
+Subject: [PATCH xserver 06/12] Xi: validate modifier values in
+ ProcXIPassiveUngrabDevice
+
+ProcXIPassiveUngrabDevice() passes client-supplied modifier values
+directly to DeletePassiveGrabFromList() without validating them.
+
+DeletePassiveGrabFromList() may reach DeleteDetailFromMask() which uses
+BITCLEAR(mask, modifier). The mask is allocated as 8 Mask words (256
+bits). A modifier value > 255 causes BITCLEAR to index mask[modifier>>5]
+past the allocation, resulting in a controlled single-bit-clear at an
+attacker-chosen heap offset.
+
+Add the same modifier validation that CheckGrabValues() uses: reject
+modifiers that are not XIAnyModifier and have bits set outside
+AllModifiersMask.
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-32366
+
+CVE-2026-93523
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 37a1847a60c6799aecf163a5cfa40077a9002675)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ Xi/xipassivegrab.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
+index 2f22e64f6..42285f6be 100644
+--- a/Xi/xipassivegrab.c
++++ b/Xi/xipassivegrab.c
+@@ -46,6 +46,10 @@
+ #include "misc.h"
+ #include "inpututils.h"
+ 
++#define AllModifiersMask ( \
++	ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
++	Mod3Mask | Mod4Mask | Mod5Mask )
++
+ int _X_COLD
+ SProcXIPassiveGrabDevice(ClientPtr client)
+ {
+@@ -349,6 +353,14 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
+     if (rc != Success)
+         return rc;
+ 
++    modifiers = (uint32_t *) &stuff[1];
++    for (i = 0; i < stuff->num_modifiers; i++, modifiers++) {
++        if (*modifiers != XIAnyModifier && (*modifiers & ~AllModifiersMask)) {
++            client->errorValue = *modifiers;
++            return BadValue;
++        }
++    }
++
+     mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD);
+ 
+     tempGrab = AllocGrab(NULL);
+-- 
+2.56.0
+

diff --git a/0006-panoramix-avoid-null-dereference-in-PanoramiXMaybeAd.patch b/0006-panoramix-avoid-null-dereference-in-PanoramiXMaybeAd.patch
new file mode 100644
index 0000000..9bbb9fe
--- /dev/null
+++ b/0006-panoramix-avoid-null-dereference-in-PanoramiXMaybeAd.patch
@@ -0,0 +1,50 @@
+From 4aaeda4cbfe4c1d3e3ca7166aac88679325ec560 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat, 20 Sep 2025 16:35:46 -0700
+Subject: [PATCH xserver 06/31] panoramix: avoid null dereference in
+ PanoramiXMaybeAddDepth()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported in #1817:
+
+Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:748:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘PanoramiXDepths’
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:802:1: enter_function: entry to ‘PanoramiXConsolidate’
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:813:17: branch_true: following ‘true’ branch...
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:814:9: branch_true: ...to here
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:814:9: call_function: calling ‘PanoramiXMaybeAddDepth’ from ‘PanoramiXConsolidate’
+746|       PanoramiXDepths = reallocarray(PanoramiXDepths,
+747|                                      PanoramiXNumDepths, sizeof(DepthRec));
+748|->     PanoramiXDepths[j].depth = pDepth->depth;
+749|       PanoramiXDepths[j].numVids = 0;
+750|       PanoramiXDepths[j].vids = NULL;
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 537b56cccaf1759f9beef9396463b1f412614003)
+(cherry picked from commit 9664b5532480ddb739e414e74e933691bbe36e85)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ Xext/panoramiX.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
+index 71713f14b..c6d0e5183 100644
+--- a/Xext/panoramiX.c
++++ b/Xext/panoramiX.c
+@@ -743,8 +743,8 @@ PanoramiXMaybeAddDepth(DepthPtr pDepth)
+ 
+     j = PanoramiXNumDepths;
+     PanoramiXNumDepths++;
+-    PanoramiXDepths = reallocarray(PanoramiXDepths,
+-                                   PanoramiXNumDepths, sizeof(DepthRec));
++    PanoramiXDepths = XNFreallocarray(PanoramiXDepths,
++                                      PanoramiXNumDepths, sizeof(DepthRec));
+     PanoramiXDepths[j].depth = pDepth->depth;
+     PanoramiXDepths[j].numVids = 0;
+     PanoramiXDepths[j].vids = NULL;
+-- 
+2.54.0
+

diff --git a/0006-saver-re-fetch-screen-private-after-CheckScreenPriva.patch b/0006-saver-re-fetch-screen-private-after-CheckScreenPriva.patch
new file mode 100644
index 0000000..0c87622
--- /dev/null
+++ b/0006-saver-re-fetch-screen-private-after-CheckScreenPriva.patch
@@ -0,0 +1,74 @@
+From 2766bcf818674f5afda6b75fbd5caeb991afc46e Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Mon, 20 Apr 2026 11:19:20 +1000
+Subject: [PATCH xserver 6/7] saver: re-fetch screen private after
+ CheckScreenPrivate in CreateSaverWindow
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CreateSaverWindow stores pPriv (the ScreenSaverScreenPrivatePtr) in a local
+variable via the SetupScreen macro at function entry. When an existing saver
+window is being replaced, the function sets pPriv->hasWindow = FALSE and
+calls CheckScreenPrivate(). If at this point pPriv->attr is NULL (cleared
+by a prior UnsetAttributes call), pPriv->events is NULL, and
+pPriv->installedMap is None, then CheckScreenPrivate determines the screen
+private is unused, frees it, and sets the screen private pointer to NULL.
+
+The function then continues to dereference the now-freed pPriv on the very
+next line (pPriv->attr), resulting in a use-after-free. On glibc 2.34+,
+the tcache key at offset 8 within the freed block makes pPriv->attr appear
+non-NULL, causing the function to continue operating on garbage data and
+eventually crash.
+
+The attack sequence is:
+  1. SetAttributes (creates pPriv with pPriv->attr set)
+  2. ForceScreenSaver(Active) (creates saver window, pPriv->hasWindow=TRUE)
+  3. UnsetAttributes (sets pPriv->attr = NULL)
+  4. ForceScreenSaver(Active) (re-enters CreateSaverWindow → UAF)
+
+Fix by re-fetching pPriv from the screen private after CheckScreenPrivate
+returns, so the subsequent NULL check correctly detects the freed state.
+
+ScreenSaverFreeAttr has the same pattern, force pPriv to NULL there too
+even though it has no real effect.
+
+This vulnerability was discovered by:
+Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-30168
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit ecc634f1b2f7aa473d3a267eada98c4918bf9e05)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2230>
+---
+ Xext/saver.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/Xext/saver.c b/Xext/saver.c
+index fd6153c31..0780e80ab 100644
+--- a/Xext/saver.c
++++ b/Xext/saver.c
+@@ -348,6 +348,9 @@ ScreenSaverFreeAttr(void *value, XID id)
+         dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive);
+     }
+     CheckScreenPrivate(pScreen);
++    /* CheckScreenPrivate may have freed pPriv (same pattern as
++     * CreateSaverWindow fix for ZDI-CAN-30168). */
++    pPriv = NULL;
+     return TRUE;
+ }
+ 
+@@ -479,6 +482,8 @@ CreateSaverWindow(ScreenPtr pScreen)
+             UninstallSaverColormap(pScreen);
+             pPriv->hasWindow = FALSE;
+             CheckScreenPrivate(pScreen);
++            /* Re-fetch pPriv since CheckScreenPrivate may have freed it */
++            pPriv = GetScreenPrivate(pScreen);
+         }
+     }
+ 
+-- 
+2.54.0
+

diff --git a/0006-xkb-Add-more-_XkbCheckRequestBounds.patch b/0006-xkb-Add-more-_XkbCheckRequestBounds.patch
new file mode 100644
index 0000000..7bed75c
--- /dev/null
+++ b/0006-xkb-Add-more-_XkbCheckRequestBounds.patch
@@ -0,0 +1,221 @@
+From 8f5e95beac2d05fa09f2887b448ae5af2f7e1104 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Mon, 2 Mar 2026 14:09:57 +0100
+Subject: [PATCH xserver 6/6] xkb: Add more _XkbCheckRequestBounds()
+
+Similar to the recent fixes, add more _XkbCheckRequestBounds() to the
+functions that loop over the request data, i.e.:
+
+ * CheckKeySyms()
+ * CheckKeyActions()
+ * CheckKeyBehaviors()
+ * CheckVirtualMods()
+ * CheckKeyExplicit()
+ * CheckVirtualModMap()
+ * _XkbSetMapChecks()
+
+All these are static functions so we can add the client to the parameters
+without breaking any API.
+
+See also:
+CVE-2026-34003, ZDI-CAN-28736, CVE-2026-34002, ZDI-CAN-28737
+
+v2: Check for "nSyms != 0" in CheckKeySyms() to avoid false positives.
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit d38c563fab5c4a554e0939da39e4d1dadef7cbae)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2177>
+---
+ xkb/xkb.c | 69 ++++++++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 55 insertions(+), 14 deletions(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index e90a5d7ba..0493210e8 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1751,6 +1751,11 @@ CheckKeySyms(ClientPtr client,
+         KeySym *pSyms;
+         register unsigned nG;
+ 
++        /* Check we received enough data to read the next xkbSymMapWireDesc */
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 1)) {
++            *errorRtrn = _XkbErrCode3(0x18, i + req->firstKeySym, i);
++            return 0;
++        }
+         if (client->swapped && doswap) {
+             swaps(&wire->nSyms);
+         }
+@@ -1789,6 +1794,12 @@ CheckKeySyms(ClientPtr client,
+             return 0;
+         }
+         pSyms = (KeySym *) &wire[1];
++        if (wire->nSyms != 0) {
++            if (!_XkbCheckRequestBounds(client, req, pSyms, &pSyms[wire->nSyms])) {
++                *errorRtrn = _XkbErrCode3(0x19, i + req->firstKeySym, wire->nSyms);
++                return 0;
++            }
++        }
+         wire = (xkbSymMapWireDesc *) &pSyms[wire->nSyms];
+     }
+ 
+@@ -1812,11 +1823,12 @@ CheckKeySyms(ClientPtr client,
+ }
+ 
+ static int
+-CheckKeyActions(XkbDescPtr xkb,
+-                xkbSetMapReq * req,
+-                int nTypes,
+-                CARD8 *mapWidths,
+-                CARD16 *symsPerKey, CARD8 **wireRtrn, int *nActsRtrn)
++CheckKeyActions(ClientPtr client,
++               XkbDescPtr xkb,
++               xkbSetMapReq * req,
++               int nTypes,
++               CARD8 *mapWidths,
++               CARD16 *symsPerKey, CARD8 **wireRtrn, int *nActsRtrn)
+ {
+     int nActs;
+     CARD8 *wire = *wireRtrn;
+@@ -1827,6 +1839,11 @@ CheckKeyActions(XkbDescPtr xkb,
+     CHK_REQ_KEY_RANGE2(0x21, req->firstKeyAct, req->nKeyActs, req, (*nActsRtrn),
+                        0);
+     for (nActs = i = 0; i < req->nKeyActs; i++) {
++        /* Check we received enough data to read the next byte on the wire */
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 1)) {
++            *nActsRtrn = _XkbErrCode3(0x24, i + req->firstKeyAct, i);
++            return 0;
++        }
+         if (wire[0] != 0) {
+             if (wire[0] == symsPerKey[i + req->firstKeyAct])
+                 nActs += wire[0];
+@@ -1845,7 +1862,8 @@ CheckKeyActions(XkbDescPtr xkb,
+ }
+ 
+ static int
+-CheckKeyBehaviors(XkbDescPtr xkb,
++CheckKeyBehaviors(ClientPtr client,
++                  XkbDescPtr xkb,
+                   xkbSetMapReq * req,
+                   xkbBehaviorWireDesc ** wireRtrn, int *errorRtrn)
+ {
+@@ -1871,6 +1889,11 @@ CheckKeyBehaviors(XkbDescPtr xkb,
+     }
+ 
+     for (i = 0; i < req->totalKeyBehaviors; i++, wire++) {
++        /* Check we received enough data to read the next behavior */
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 1)) {
++            *errorRtrn = _XkbErrCode3(0x36, first, i);
++            return 0;
++        }
+         if ((wire->key < first) || (wire->key > last)) {
+             *errorRtrn = _XkbErrCode4(0x33, first, last, wire->key);
+             return 0;
+@@ -1896,7 +1919,8 @@ CheckKeyBehaviors(XkbDescPtr xkb,
+ }
+ 
+ static int
+-CheckVirtualMods(XkbDescRec * xkb,
++CheckVirtualMods(ClientPtr client,
++                 XkbDescRec * xkb,
+                  xkbSetMapReq * req, CARD8 **wireRtrn, int *errorRtrn)
+ {
+     register CARD8 *wire = *wireRtrn;
+@@ -1908,12 +1932,18 @@ CheckVirtualMods(XkbDescRec * xkb,
+         if (req->virtualMods & bit)
+             nMods++;
+     }
++    /* Check we received enough data for the number of virtual mods expected */
++    if (!_XkbCheckRequestBounds(client, req, wire, wire + XkbPaddedSize(nMods))) {
++        *errorRtrn = _XkbErrCode3(0x37, nMods, i);
++        return 0;
++    }
+     *wireRtrn = (wire + XkbPaddedSize(nMods));
+     return 1;
+ }
+ 
+ static int
+-CheckKeyExplicit(XkbDescPtr xkb,
++CheckKeyExplicit(ClientPtr client,
++                 XkbDescPtr xkb,
+                  xkbSetMapReq * req, CARD8 **wireRtrn, int *errorRtrn)
+ {
+     register CARD8 *wire = *wireRtrn;
+@@ -1939,6 +1969,11 @@ CheckKeyExplicit(XkbDescPtr xkb,
+     }
+     start = wire;
+     for (i = 0; i < req->totalKeyExplicit; i++, wire += 2) {
++        /* Check we received enough data to read the next two bytes */
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 2)) {
++            *errorRtrn = _XkbErrCode4(0x54, first, last, i);
++            return 0;
++        }
+         if ((wire[0] < first) || (wire[0] > last)) {
+             *errorRtrn = _XkbErrCode4(0x53, first, last, wire[0]);
+             return 0;
+@@ -1994,7 +2029,8 @@ CheckModifierMap(ClientPtr client, XkbDescPtr xkb, xkbSetMapReq * req,
+ }
+ 
+ static int
+-CheckVirtualModMap(XkbDescPtr xkb,
++CheckVirtualModMap(ClientPtr client,
++                   XkbDescPtr xkb,
+                    xkbSetMapReq * req,
+                    xkbVModMapWireDesc ** wireRtrn, int *errRtrn)
+ {
+@@ -2018,6 +2054,11 @@ CheckVirtualModMap(XkbDescPtr xkb,
+         return 0;
+     }
+     for (i = 0; i < req->totalVModMapKeys; i++, wire++) {
++        /* Check we received enough data to read the next virtual mod map key */
++        if (!_XkbCheckRequestBounds(client, req, wire, wire + 1)) {
++            *errRtrn = _XkbErrCode3(0x74, first, i);
++            return 0;
++        }
+         if ((wire->key < first) || (wire->key > last)) {
+             *errRtrn = _XkbErrCode4(0x73, first, last, wire->key);
+             return 0;
+@@ -2561,7 +2602,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
+     }
+ 
+     if ((req->present & XkbKeyActionsMask) &&
+-        (!CheckKeyActions(xkb, req, nTypes, mapWidths, symsPerKey,
++        (!CheckKeyActions(client, xkb, req, nTypes, mapWidths, symsPerKey,
+                           (CARD8 **) &values, &nActions))) {
+         client->errorValue = nActions;
+         return BadValue;
+@@ -2569,18 +2610,18 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
+ 
+     if ((req->present & XkbKeyBehaviorsMask) &&
+         (!CheckKeyBehaviors
+-         (xkb, req, (xkbBehaviorWireDesc **) &values, &error))) {
++         (client, xkb, req, (xkbBehaviorWireDesc **) &values, &error))) {
+         client->errorValue = error;
+         return BadValue;
+     }
+ 
+     if ((req->present & XkbVirtualModsMask) &&
+-        (!CheckVirtualMods(xkb, req, (CARD8 **) &values, &error))) {
++        (!CheckVirtualMods(client, xkb, req, (CARD8 **) &values, &error))) {
+         client->errorValue = error;
+         return BadValue;
+     }
+     if ((req->present & XkbExplicitComponentsMask) &&
+-        (!CheckKeyExplicit(xkb, req, (CARD8 **) &values, &error))) {
++        (!CheckKeyExplicit(client, xkb, req, (CARD8 **) &values, &error))) {
+         client->errorValue = error;
+         return BadValue;
+     }
+@@ -2591,7 +2632,7 @@ _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req,
+     }
+     if ((req->present & XkbVirtualModMapMask) &&
+         (!CheckVirtualModMap
+-         (xkb, req, (xkbVModMapWireDesc **) &values, &error))) {
++         (client, xkb, req, (xkbVModMapWireDesc **) &values, &error))) {
+         client->errorValue = error;
+         return BadValue;
+     }
+-- 
+2.53.0
+

diff --git a/0007-dix-increase-XLFDMAXFONTNAMELEN-to-match-libXfont2-s.patch b/0007-dix-increase-XLFDMAXFONTNAMELEN-to-match-libXfont2-s.patch
new file mode 100644
index 0000000..88ff912
--- /dev/null
+++ b/0007-dix-increase-XLFDMAXFONTNAMELEN-to-match-libXfont2-s.patch
@@ -0,0 +1,90 @@
+From 93596a0b4dec958cc8f614fc25a2b68c8edc852a Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 29 Apr 2026 05:40:33 +0000
+Subject: [PATCH xserver 7/7] dix: increase XLFDMAXFONTNAMELEN to match
+ libXfont2's MAXFONTNAMELEN
+
+XLFDMAXFONTNAMELEN was 256 bytes, but libXfont2 defines MAXFONTNAMELEN
+as 1024 and allows font names and alias targets up to that length in
+fonts.alias files.
+
+doListFontsAndAliases copies the resolved alias target into a
+stack-allocated tmp_pattern[XLFDMAXFONTNAMELEN] and then into
+c->current.pattern[XLFDMAXFONTNAMELEN] (defined in LFWIstateRec).
+doListFontsWithInfo has the same pattern, copying the resolved name into
+c->current.pattern[]. With the old 256-byte limit, a fonts.alias entry
+with a target name between 257 and 1023 bytes would overflow both
+buffers.
+
+An attacker can exploit this by:
+  1. Creating a font directory with a fonts.alias containing an alias
+     whose target name exceeds 256 bytes
+  2. Using SetFontPath to add the malicious directory
+  3. Calling ListFonts with the alias name to trigger alias resolution
+  4. The oversized resolved name overflows the 256-byte stack buffer
+
+Increase XLFDMAXFONTNAMELEN from 256 to 1024 to match libXfont2's
+MAXFONTNAMELEN, ensuring the server can handle any name the font library
+produces.
+
+This vulnerability was discovered by:
+Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-30136
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit bb5158f962dc935e58ef8b4b5fcb31be201a6e07)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2230>
+---
+ dix/dixfonts.c     | 8 ++++++++
+ include/closestr.h | 7 ++++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/dix/dixfonts.c b/dix/dixfonts.c
+index 4fdb60699..b7eb09f38 100644
+--- a/dix/dixfonts.c
++++ b/dix/dixfonts.c
+@@ -670,6 +670,10 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
+                  * is BadFontName, indicating the alias resolution
+                  * is complete.
+                  */
++                if (resolvedlen > XLFDMAXFONTNAMELEN) {
++                    err = BadFontName;
++                    goto ContBadFontName;
++                }
+                 memcpy(tmp_pattern, resolved, resolvedlen);
+                 if (c->haveSaved) {
+                     char *tmpname;
+@@ -932,6 +936,10 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
+                 memcpy(c->savedName, name, namelen + 1);
+                 aliascount = 20;
+             }
++            if (namelen > XLFDMAXFONTNAMELEN) {
++                err = BadFontName;
++                goto ContBadFontName;
++            }
+             memmove(c->current.pattern, name, namelen);
+             c->current.patlen = namelen;
+             c->current.max_names = 1;
+diff --git a/include/closestr.h b/include/closestr.h
+index 60e6f09bc..7567ac6ea 100644
+--- a/include/closestr.h
++++ b/include/closestr.h
+@@ -57,7 +57,12 @@ typedef struct _OFclosure {
+ 
+ /* ListFontsWithInfo */
+ 
+-#define XLFDMAXFONTNAMELEN	256
++/* libXfont2 allows font names/aliases up to MAXFONTNAMELEN (1024) bytes in
++ * fonts.alias files.  The server's pattern buffers must be large enough to
++ * hold resolved alias targets returned by the font library.
++ * ZDI-CAN-30136
++ */
++#define XLFDMAXFONTNAMELEN	1024
+ typedef struct _LFWIstate {
+     char pattern[XLFDMAXFONTNAMELEN];
+     int patlen;
+-- 
+2.54.0
+

diff --git a/0007-glx-validate-dataBytes-against-cmdlen-in-RenderLarge.patch b/0007-glx-validate-dataBytes-against-cmdlen-in-RenderLarge.patch
new file mode 100644
index 0000000..0e13f97
--- /dev/null
+++ b/0007-glx-validate-dataBytes-against-cmdlen-in-RenderLarge.patch
@@ -0,0 +1,53 @@
+From f64e793e464cda7c70bdc39ca8e2bef4112eae7a Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:16:49 +1000
+Subject: [PATCH xserver 07/12] glx: validate dataBytes against cmdlen in
+ RenderLarge first request
+
+__glXDisp_RenderLarge() allocates the large command buffer based on
+cmdlen (from hdr->length, the total command size embedded in the
+payload), but copies dataBytes (from req->dataBytes, the payload size
+of the current sub-request) into it. The existing length check only
+validates that the X11 request length is consistent with dataBytes,
+not that dataBytes fits within the cmdlen-sized buffer.
+
+A malicious client can set hdr->length to a small value (e.g. 12 bytes)
+while sending a large dataBytes (up to ~256KB or more with
+BIG-REQUESTS), causing the memcpy to overflow the cmdlen-sized buffer.
+
+Add a check that dataBytes <= cmdlen before the buffer allocation and
+copy on the first request.
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31833
+
+CVE-2026-93517
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 2abe4632d793314d3d5f28c19583fb76019f5ce4)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ glx/glxcmds.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/glx/glxcmds.c b/glx/glxcmds.c
+index 8a13e34b5..2085f3ef0 100644
+--- a/glx/glxcmds.c
++++ b/glx/glxcmds.c
+@@ -2190,6 +2190,9 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc)
+             return BadLength;
+         }
+ 
++        if (dataBytes > cmdlen)
++            return BadLength;
++
+         /*
+          ** Make enough space in the buffer, then copy the entire request.
+          */
+-- 
+2.56.0
+

diff --git a/0007-panoramix-avoid-null-dereference-in-PanoramiXConsoli.patch b/0007-panoramix-avoid-null-dereference-in-PanoramiXConsoli.patch
new file mode 100644
index 0000000..3a46888
--- /dev/null
+++ b/0007-panoramix-avoid-null-dereference-in-PanoramiXConsoli.patch
@@ -0,0 +1,72 @@
+From ccd2a541458a844397757cebade4970173471a30 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat, 20 Sep 2025 16:45:59 -0700
+Subject: [PATCH xserver 07/31] panoramix: avoid null dereference in
+ PanoramiXConsolidate()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported in #1817:
+
+Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:820:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘root’
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:819:12: acquire_memory: this call could return NULL
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:820:5: danger: ‘root’ could be NULL: unchecked value from (1)
+818|
+819|       root = malloc(sizeof(PanoramiXRes));
+820|->     root->type = XRT_WINDOW;
+821|       defmap = malloc(sizeof(PanoramiXRes));
+822|       defmap->type = XRT_COLORMAP;
+Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
+
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:822:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘defmap’
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:821:14: acquire_memory: this call could return NULL
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:822:5: danger: ‘defmap’ could be NULL: unchecked value from (1)
+820|       root->type = XRT_WINDOW;
+821|       defmap = malloc(sizeof(PanoramiXRes));
+822|->     defmap->type = XRT_COLORMAP;
+823|       saver = malloc(sizeof(PanoramiXRes));
+824|       saver->type = XRT_WINDOW;
+
+Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:824:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘saver’
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:823:13: acquire_memory: this call could return NULL
+xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:824:5: danger: ‘saver’ could be NULL: unchecked value from (1)
+822|       defmap->type = XRT_COLORMAP;
+823|       saver = malloc(sizeof(PanoramiXRes));
+824|->     saver->type = XRT_WINDOW;
+825|
+826|       FOR_NSCREENS(i) {
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 23c103d41f35cc030b0c0e973f7f3bcb8d9902a0)
+(cherry picked from commit 6edd79e5f50df456c7dccc693188229684d8f55f)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ Xext/panoramiX.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
+index c6d0e5183..cea919bf0 100644
+--- a/Xext/panoramiX.c
++++ b/Xext/panoramiX.c
+@@ -816,11 +816,11 @@ PanoramiXConsolidate(void)
+     for (i = 0; i < pScreen->numVisuals; i++)
+         PanoramiXMaybeAddVisual(pVisual++);
+ 
+-    root = malloc(sizeof(PanoramiXRes));
++    root = XNFcallocarray(1, sizeof(PanoramiXRes));
+     root->type = XRT_WINDOW;
+-    defmap = malloc(sizeof(PanoramiXRes));
++    defmap = XNFcallocarray(1, sizeof(PanoramiXRes));
+     defmap->type = XRT_COLORMAP;
+-    saver = malloc(sizeof(PanoramiXRes));
++    saver = XNFcallocarray(1, sizeof(PanoramiXRes));
+     saver->type = XRT_WINDOW;
+ 
+     FOR_NSCREENS(i) {
+-- 
+2.54.0
+

diff --git a/0008-glamor-handle-potential-NULL-return-from-GetPictureS.patch b/0008-glamor-handle-potential-NULL-return-from-GetPictureS.patch
new file mode 100644
index 0000000..cefe7a3
--- /dev/null
+++ b/0008-glamor-handle-potential-NULL-return-from-GetPictureS.patch
@@ -0,0 +1,89 @@
+From 7280a8d92738f048d4ccfda19effab9f0bdec492 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat, 25 Oct 2025 15:33:40 -0700
+Subject: [PATCH xserver 08/31] glamor: handle potential NULL return from
+ GetPictureScreenIfSet()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Unlike GetPictureScreen(), GetPictureScreenIfSet() checks if the
+private key is registered, and returns NULL if it is not.
+
+Reported in #1817:
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor.c:926:5:
+ warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ps’
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 69b48423bd66f04bac8a633004ebc8e6e691756f)
+(cherry picked from commit 394cb2d824df5fa481279173357a4ad1c759ceec)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ glamor/glamor.c | 38 +++++++++++++++++++++-----------------
+ 1 file changed, 21 insertions(+), 17 deletions(-)
+
+diff --git a/glamor/glamor.c b/glamor/glamor.c
+index 70a34d81b..7c88d7e18 100644
+--- a/glamor/glamor.c
++++ b/glamor/glamor.c
+@@ -840,23 +840,25 @@ glamor_init(ScreenPtr screen, unsigned int flags)
+     glamor_priv->saved_procs.bitmap_to_region = screen->BitmapToRegion;
+     screen->BitmapToRegion = glamor_bitmap_to_region;
+ 
+-    glamor_priv->saved_procs.composite = ps->Composite;
+-    ps->Composite = glamor_composite;
++    if (ps) {
++        glamor_priv->saved_procs.composite = ps->Composite;
++        ps->Composite = glamor_composite;
+ 
+-    glamor_priv->saved_procs.trapezoids = ps->Trapezoids;
+-    ps->Trapezoids = glamor_trapezoids;
++        glamor_priv->saved_procs.trapezoids = ps->Trapezoids;
++        ps->Trapezoids = glamor_trapezoids;
+ 
+-    glamor_priv->saved_procs.triangles = ps->Triangles;
+-    ps->Triangles = glamor_triangles;
++        glamor_priv->saved_procs.triangles = ps->Triangles;
++        ps->Triangles = glamor_triangles;
+ 
+-    glamor_priv->saved_procs.addtraps = ps->AddTraps;
+-    ps->AddTraps = glamor_add_traps;
++        glamor_priv->saved_procs.addtraps = ps->AddTraps;
++        ps->AddTraps = glamor_add_traps;
+ 
+-    glamor_priv->saved_procs.composite_rects = ps->CompositeRects;
+-    ps->CompositeRects = glamor_composite_rectangles;
++        glamor_priv->saved_procs.composite_rects = ps->CompositeRects;
++        ps->CompositeRects = glamor_composite_rectangles;
+ 
+-    glamor_priv->saved_procs.glyphs = ps->Glyphs;
+-    ps->Glyphs = glamor_composite_glyphs;
++        glamor_priv->saved_procs.glyphs = ps->Glyphs;
++        ps->Glyphs = glamor_composite_glyphs;
++    }
+ 
+     glamor_init_vbo(screen);
+ 
+@@ -923,11 +925,13 @@ glamor_close_screen(ScreenPtr screen)
+     screen->BitmapToRegion = glamor_priv->saved_procs.bitmap_to_region;
+     screen->BlockHandler = glamor_priv->saved_procs.block_handler;
+ 
+-    ps->Composite = glamor_priv->saved_procs.composite;
+-    ps->Trapezoids = glamor_priv->saved_procs.trapezoids;
+-    ps->Triangles = glamor_priv->saved_procs.triangles;
+-    ps->CompositeRects = glamor_priv->saved_procs.composite_rects;
+-    ps->Glyphs = glamor_priv->saved_procs.glyphs;
++    if (ps) {
++        ps->Composite = glamor_priv->saved_procs.composite;
++        ps->Trapezoids = glamor_priv->saved_procs.trapezoids;
++        ps->Triangles = glamor_priv->saved_procs.triangles;
++        ps->CompositeRects = glamor_priv->saved_procs.composite_rects;
++        ps->Glyphs = glamor_priv->saved_procs.glyphs;
++    }
+ 
+     screen_pixmap = screen->GetScreenPixmap(screen);
+     glamor_pixmap_destroy_fbo(screen_pixmap);
+-- 
+2.54.0
+

diff --git a/0008-present-unlink-notifies-from-window-list-in-present_.patch b/0008-present-unlink-notifies-from-window-list-in-present_.patch
new file mode 100644
index 0000000..2c5f59a
--- /dev/null
+++ b/0008-present-unlink-notifies-from-window-list-in-present_.patch
@@ -0,0 +1,73 @@
+From 38339f1792d6f6f21e5f1bf1663c9febd0ca403c Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:04:47 +1000
+Subject: [PATCH xserver 08/12] present: unlink notifies from window list in
+ present_clear_window_notifies
+
+When a window is destroyed, present_clear_window_notifies()
+does not remove the notify list node from the window. The notify
+may then be freed as part of the window_priv, leaving dangling
+pointers in place.
+
+When the vblank owning the notify is later torn down,
+present_free_window_notify() calls xorg_list_del() which
+writes through these dangling pointers (use-after-free write).
+
+This happens when Present cross-window notifies are used: a
+PresentPixmap on window A can reference window B as a notify target.
+An untriggered wait_fence keeps the vblank alive so that B can be
+destroyed first, creating the dangling-pointer window.
+
+Fix this by calling the free function we have (and moving the window
+reset into that function too). present_clear_window_notifies is only
+called from one place anyway.
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31830
+
+CVE-2026-93515
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 1b6955c3108e6b43433aefe860070708e6f43d1b)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ present/present_notify.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/present/present_notify.c b/present/present_notify.c
+index 531b949b6..e586f8aa4 100644
+--- a/present/present_notify.c
++++ b/present/present_notify.c
+@@ -30,14 +30,14 @@
+ void
+ present_clear_window_notifies(WindowPtr window)
+ {
+-    present_notify_ptr          notify;
++    present_notify_ptr          notify, tmp;
+     present_window_priv_ptr     window_priv = present_window_priv(window);
+ 
+     if (!window_priv)
+         return;
+ 
+-    xorg_list_for_each_entry(notify, &window_priv->notifies, window_list) {
+-        notify->window = NULL;
++    xorg_list_for_each_entry_safe(notify, tmp, &window_priv->notifies, window_list) {
++        present_free_window_notify(notify);
+     }
+ }
+ 
+@@ -48,6 +48,7 @@ present_clear_window_notifies(WindowPtr window)
+ void
+ present_free_window_notify(present_notify_ptr notify)
+ {
++    notify->window = NULL;
+     xorg_list_del(&notify->window_list);
+ }
+ 
+-- 
+2.56.0
+

diff --git a/0009-dix-remove-passive-grabs-referencing-a-device-on-rem.patch b/0009-dix-remove-passive-grabs-referencing-a-device-on-rem.patch
new file mode 100644
index 0000000..120ebd8
--- /dev/null
+++ b/0009-dix-remove-passive-grabs-referencing-a-device-on-rem.patch
@@ -0,0 +1,88 @@
+From 649ea4b0340d2aa00339c36fe7157a03af43ba87 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:16:59 +1000
+Subject: [PATCH xserver 09/12] dix: remove passive grabs referencing a device
+ on removal
+
+Passive grabs (GrabRec) store raw DeviceIntPtr values for both the
+grabbed device and the modifier device without any lifetime management.
+When a device is removed via XIRemoveMaster, CloseDevice() frees the
+device struct, but leaves dangling pointers in grab->modifierDevice
+for any grab that used this device.
+
+Subsequent pointer events trigger CheckPassiveGrab() which dereferences
+the dangling modifierDevice pointer for XI grabs (the CORE and XI2 paths
+reassign it, but the XI path does not).
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31832
+
+CVE-2026-93516
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit be572634158850fff4e9829cee88db08d30c9743)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ dix/devices.c | 36 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+diff --git a/dix/devices.c b/dix/devices.c
+index 02b0ea1cc..1e1c777e3 100644
+--- a/dix/devices.c
++++ b/dix/devices.c
+@@ -1197,6 +1197,40 @@ CloseOneDevice(const DeviceIntPtr dev, DeviceIntPtr *listHead)
+     return BadMatch;
+ }
+ 
++static Bool
++GrabReferencesDevice(void *value, XID id, void *cdata)
++{
++    GrabPtr grab = value;
++    DeviceIntPtr dev = cdata;
++
++    return grab->device == dev || grab->modifierDevice == dev;
++}
++
++/**
++ * Remove all passive grabs that reference the given device, either as
++ * the grabbed device or as the modifier device. This must be called
++ * before the device is freed to avoid dangling pointers in GrabRec.
++ */
++static void
++RemovePassiveGrabsForDevice(DeviceIntPtr dev)
++{
++    int i;
++
++    for (i = 0; i < currentMaxClients; i++) {
++        GrabPtr grab;
++
++        if (!clients[i])
++            continue;
++
++        while ((grab = LookupClientResourceComplex(clients[i],
++                                                   RT_PASSIVEGRAB,
++                                                   GrabReferencesDevice,
++                                                   dev))) {
++            FreeResource(grab->resource, RT_NONE);
++        }
++    }
++}
++
+ /**
+  * Remove a device from the device list, closes it and thus frees all
+  * resources.
+@@ -1236,6 +1270,8 @@ RemoveDevice(DeviceIntPtr dev, BOOL sendevent)
+         flags[dev->id] = XIDeviceDisabled;
+     }
+ 
++    RemovePassiveGrabsForDevice(dev);
++
+     flag = IsMaster(dev) ? XIMasterRemoved : XISlaveRemoved;
+ 
+     input_lock();
+-- 
+2.56.0
+

diff --git a/0009-glamor-handle-allocation-failure-in-glamor_create_pi.patch b/0009-glamor-handle-allocation-failure-in-glamor_create_pi.patch
new file mode 100644
index 0000000..34a93f6
--- /dev/null
+++ b/0009-glamor-handle-allocation-failure-in-glamor_create_pi.patch
@@ -0,0 +1,46 @@
+From e0fc4404a165a8262a86cec6305108b76a3c7a5c Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat, 25 Oct 2025 16:27:34 -0700
+Subject: [PATCH xserver 09/31] glamor: handle allocation failure in
+ glamor_create_pixmap()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported by gcc 15.1:
+
+../glamor/glamor.c: In function ‘glamor_create_pixmap’:
+../glamor/glamor.c:233:23: warning: potential null pointer dereference
+ [-Wnull-dereference]
+  233 |     pixmap_priv->type = GLAMOR_TEXTURE_ONLY;
+      |     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
+../glamor/glamor.c:228:26: warning: potential null pointer dereference
+ [-Wnull-dereference]
+  228 |     pixmap_priv->is_cbcr = (GLAMOR_CREATE_FORMAT_CBCR & usage) == GLAMOR_CREATE_FORMAT_CBCR;
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit cc647f23679ae2beb7b971aa7d1203375c25bb55)
+(cherry picked from commit 3611931eb3cec6e89df298bebab88beac89644aa)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ glamor/glamor.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/glamor/glamor.c b/glamor/glamor.c
+index 7c88d7e18..b2bd34f39 100644
+--- a/glamor/glamor.c
++++ b/glamor/glamor.c
+@@ -223,6 +223,9 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
+     else
+         pixmap = fbCreatePixmap(screen, 0, 0, depth, usage);
+ 
++    if (!pixmap)
++        return NullPixmap;
++
+     pixmap_priv = glamor_get_pixmap_private(pixmap);
+ 
+     pixmap_priv->is_cbcr = (GLAMOR_CREATE_FORMAT_CBCR & usage) == GLAMOR_CREATE_FORMAT_CBCR;
+-- 
+2.54.0
+

diff --git a/0010-Xi-add-bounds-check-for-barrier-events-in-input_cons.patch b/0010-Xi-add-bounds-check-for-barrier-events-in-input_cons.patch
new file mode 100644
index 0000000..bb22c68
--- /dev/null
+++ b/0010-Xi-add-bounds-check-for-barrier-events-in-input_cons.patch
@@ -0,0 +1,186 @@
+From 8a82016f0b78e3468175a962e8831fd34ca3c82f Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:17:12 +1000
+Subject: [PATCH xserver 10/12] Xi: add bounds check for barrier events in
+ input_constrain_cursor
+
+input_constrain_cursor() writes barrier hit and leave events into the
+InputEventList buffer without checking how many slots remain.
+The buffer is allocated by the DDX at GetMaximumEventsNum() (100) entries
+and may contain one raw event already. A client can create more than 100
+pointer barriers, pre-arm them as released via XIBarrierReleasePointer,
+and then trigger a single pointer motion that crosses all barriers
+simultaneously. The leave event loop iterates every hit barrier and
+writes one event per barrier, overflowing the 100-slot buffer.
+
+In an ideal world we'd change the InternalEvent* pointer to a struct
+that contains allocated size, number of events and the pointer itself
+but we're crossing public APIs here and that requires an ABI bump.
+
+So we make do with cutting off the number of barrier events at 64 which
+should be low enough to not trigger the issue. However, for the 100+
+barrier case this means we only send BarierHit events, not BarrierRelease.
+Potentially leaving a client stuck.
+
+We mitigate that problem by simply refusing to create more than 32
+barriers per screen (which on its own would also fix the issue, but hey,
+'doppelt gemoppelt' as they say).
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-31938
+
+CVE-2026-93519
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit 1f42cc1f00d9c6d46978ae82dba8a52f4d902369)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ Xi/xibarriers.c | 82 +++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 55 insertions(+), 27 deletions(-)
+
+diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
+index ad82852fe..aad8db752 100644
+--- a/Xi/xibarriers.c
++++ b/Xi/xibarriers.c
+@@ -416,6 +416,18 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
+     InternalEvent *barrier_events = events;
+     DeviceIntPtr master;
+ 
++    /* We cannot know how many events are available in *events, but
++     * we know it all DDX very protbably allocated them with
++     * GetMaximumEventsNum() and fill_pointer_events() may have added one.
++     *
++     * Let's cap at a maximum of 64 barrier events which is way more than
++     * we'll need but low enough that we shouldn't OOB on *events.
++     *
++     * Changing the signatures to get some sz_events in here is an ABI change
++     * through miPointerSetPosition so... weeping face.
++     */
++    const int MAX_BARRIER_EVENTS = 64;
++
+     if (nevents)
+         *nevents = 0;
+ 
+@@ -460,7 +472,6 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
+         if (pbd->barrier_event_id == pbd->release_event_id)
+             continue;
+ 
+-        ev.type = ET_BarrierHit;
+         barrier_clamp_to_barrier(nearest, dir, &x, &y);
+ 
+         if (barrier_is_vertical(nearest)) {
+@@ -472,19 +483,22 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
+             current_y = y;
+         }
+ 
+-        ev.flags = 0;
+-        ev.event_id = pbd->barrier_event_id;
+-        ev.barrierid = c->id;
++        if (*nevents < MAX_BARRIER_EVENTS) {
++            ev.type = ET_BarrierHit;
++            ev.flags = 0;
++            ev.event_id = pbd->barrier_event_id;
++            ev.barrierid = c->id;
+ 
+-        ev.dt = new_sequence ? 0 : ms - pbd->last_timestamp;
+-        ev.window = c->window;
+-        pbd->last_timestamp = ms;
++            ev.dt = new_sequence ? 0 : ms - pbd->last_timestamp;
++            ev.window = c->window;
+ 
+-        /* root x/y is filled in later */
++            /* root x/y is filled in later */
+ 
+-        barrier_events->barrier_event = ev;
+-        barrier_events++;
+-        *nevents += 1;
++            barrier_events->barrier_event = ev;
++            barrier_events++;
++            *nevents += 1;
++        }
++        pbd->last_timestamp = ms;
+     }
+ 
+     xorg_list_for_each_entry(c, &cs->barriers, entry) {
+@@ -503,29 +517,31 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen,
+             continue;
+ 
+         pbd->hit = FALSE;
++        pbd->last_timestamp = ms;
++        /* If we've left the hit box, this is the
++         * start of a new event ID. */
++        pbd->barrier_event_id++;
+ 
+-        ev.type = ET_BarrierLeave;
++        if (*nevents < MAX_BARRIER_EVENTS) {
++            ev.type = ET_BarrierLeave;
+ 
+-        if (pbd->barrier_event_id == pbd->release_event_id)
+-            flags |= XIBarrierPointerReleased;
++            if (pbd->barrier_event_id == pbd->release_event_id)
++                flags |= XIBarrierPointerReleased;
+ 
+-        ev.flags = flags;
+-        ev.event_id = pbd->barrier_event_id;
+-        ev.barrierid = c->id;
++            ev.flags = flags;
++            ev.event_id = pbd->barrier_event_id;
++            ev.barrierid = c->id;
+ 
+-        ev.dt = ms - pbd->last_timestamp;
+-        ev.window = c->window;
+-        pbd->last_timestamp = ms;
++            ev.dt = ms - pbd->last_timestamp;
++            ev.window = c->window;
+ 
+-        /* root x/y is filled in later */
++            /* root x/y is filled in later */
+ 
+-        barrier_events->barrier_event = ev;
+-        barrier_events++;
+-        *nevents += 1;
++            barrier_events->barrier_event = ev;
++            barrier_events++;
++            *nevents += 1;
++        }
+ 
+-        /* If we've left the hit box, this is the
+-         * start of a new event ID. */
+-        pbd->barrier_event_id++;
+     }
+ 
+  out:
+@@ -557,8 +573,10 @@ CreatePointerBarrierClient(ClientPtr client,
+     int size;
+     int i;
+     struct PointerBarrierClient *ret;
++    struct PointerBarrierClient *counter;
+     CARD16 *in_devices;
+     DeviceIntPtr dev;
++    size_t nbarriers = 0;
+ 
+     size = sizeof(*ret) + sizeof(DeviceIntPtr) * stuff->num_devices;
+     ret = malloc(size);
+@@ -578,6 +596,16 @@ CreatePointerBarrierClient(ClientPtr client,
+     screen = pWin->drawable.pScreen;
+     cs = GetBarrierScreen(screen);
+ 
++    /* Only allow for a maximum of 32 barriers to be created. This
++     * should be more than enough and prevents issues in
++     * input_constrain_cursor, see MAX_BARRIER_EVENTS in that
++     * function */
++    xorg_list_for_each_entry(counter, &cs->barriers, entry) {
++        nbarriers++;
++        if (nbarriers >= 32)
++            return BadAlloc;
++    }
++
+     ret->screen = screen;
+     ret->window = stuff->window;
+     ret->num_devices = stuff->num_devices;
+-- 
+2.56.0
+

diff --git a/0010-glamor-silence-false-positive-in-glamor_validate_gc.patch b/0010-glamor-silence-false-positive-in-glamor_validate_gc.patch
new file mode 100644
index 0000000..68ef1b0
--- /dev/null
+++ b/0010-glamor-silence-false-positive-in-glamor_validate_gc.patch
@@ -0,0 +1,42 @@
+From c3507c99d9466d189b03d9ef1e9957a651441be6 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Oct 2025 12:56:13 -0700
+Subject: [PATCH xserver 10/31] glamor: silence false positive in
+ glamor_validate_gc()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We know that if gc->tileIsPixel is false, then gc->tile.pixmap must be
+a valid pixmap, but gcc's static analyzer doesn't and needs to be told.
+
+Silences false positive reported in #1817:
+
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor_core.c:205:19:
+ warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit a79bdc495eaabd770cec03badd74c3b023877ba1)
+(cherry picked from commit 03b40ee38d58285063c7ed22998a390422109f13)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ glamor/glamor_core.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
+index 9a7510da0..8a601d086 100644
+--- a/glamor/glamor_core.c
++++ b/glamor/glamor_core.c
+@@ -200,6 +200,8 @@ glamor_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable)
+      */
+     if (changes & GCTile) {
+         if (!gc->tileIsPixel) {
++            assert(gc->tile.pixmap != NullPixmap);
++
+             glamor_pixmap_private *pixmap_priv =
+                 glamor_get_pixmap_private(gc->tile.pixmap);
+             if ((!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv))
+-- 
+2.54.0
+

diff --git a/0011-Xi-clean-up-gesture-sprite-traces-in-WindowGone.patch b/0011-Xi-clean-up-gesture-sprite-traces-in-WindowGone.patch
new file mode 100644
index 0000000..5c2f65e
--- /dev/null
+++ b/0011-Xi-clean-up-gesture-sprite-traces-in-WindowGone.patch
@@ -0,0 +1,79 @@
+From b95584b94586653de2cd82f36a47fda8642c050e Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Thu, 3 Sep 2026 14:57:31 +1000
+Subject: [PATCH xserver 11/12] Xi: clean up gesture sprite traces in
+ WindowGone
+
+Gesture sprite traces which have the same 'fixed sprite trace
+for the duration of the gesture' logic as touch sprite traces.
+Both copy WindowPtrs into the trace without refcounting them.
+
+If a device supports gestures but does not have a TouchClass,
+the cleanup skipped over the gesture sprite cleanup, leaving
+dangling pointers in place if a sprite trace is destroyed
+during an active gesture (i.e. window is removed).
+
+DeliverOneGestureEvent() then dereferences the stale pointer via
+DeepestSpriteWin(&gi->sprite)->drawable.id, causing a use-after-free.
+
+This vulnerability was discovered by:
+  4nibhal working with TrendAI Zero Day Initiative
+
+ZDI-CAN-32753
+
+CVE-2026-93536
+
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit efcfd8acc754c5ac4b2555ff375dd5101d735b0a)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ Xi/exevents.c | 24 +++++++++++++++++-------
+ 1 file changed, 17 insertions(+), 7 deletions(-)
+
+diff --git a/Xi/exevents.c b/Xi/exevents.c
+index 1991399ce..0f3c5fb88 100644
+--- a/Xi/exevents.c
++++ b/Xi/exevents.c
+@@ -2873,9 +2873,8 @@ InputClientGone(WindowPtr pWin, XID id)
+ }
+ 
+ /**
+- * Search for window in each touch trace for each device. Remove the window
+- * and all its subwindows from the trace when found. The initial window
+- * order is preserved.
++ * Search for window in each touch and gesture trace for each device.
++ * Truncate the trace when the window is found.
+  */
+ void
+ WindowGone(WindowPtr win)
+@@ -2886,11 +2885,22 @@ WindowGone(WindowPtr win)
+         TouchClassPtr t = dev->touch;
+         int i;
+ 
+-        if (!t)
+-            continue;
++        if (t) {
++            for (i = 0; i < t->num_touches; i++) {
++                SpritePtr sprite = &t->touches[i].sprite;
++                int j;
++
++                for (j = 0; j < sprite->spriteTraceGood; j++) {
++                    if (sprite->spriteTrace[j] == win) {
++                        sprite->spriteTraceGood = j;
++                        break;
++                    }
++                }
++            }
++        }
+ 
+-        for (i = 0; i < t->num_touches; i++) {
+-            SpritePtr sprite = &t->touches[i].sprite;
++        if (dev->gesture) {
++            SpritePtr sprite = &dev->gesture->gesture.sprite;
+             int j;
+ 
+             for (j = 0; j < sprite->spriteTraceGood; j++) {
+-- 
+2.56.0
+

diff --git a/0011-glamor-handle-allocation-failures-in-glamor_largepix.patch b/0011-glamor-handle-allocation-failures-in-glamor_largepix.patch
new file mode 100644
index 0000000..7e8adb7
--- /dev/null
+++ b/0011-glamor-handle-allocation-failures-in-glamor_largepix.patch
@@ -0,0 +1,94 @@
+From 9b14c2bfd41a4c9a6b29eac91a4ab1ddbe782f5e Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 26 Oct 2025 15:39:47 -0700
+Subject: [PATCH xserver 11/31] glamor: handle allocation failures in
+ glamor_largepixmap.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported in #1817:
+
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor_largepixmap.c:130:17:
+ warning[-Wanalyzer-possible-null-dereference]:
+  dereference of possibly-NULL ‘clipped_regions’
+
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor_largepixmap.c:235:13:
+ warning[-Wanalyzer-possible-null-dereference]:
+  dereference of possibly-NULL ‘result_regions’
+
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor_largepixmap.c:365:9:
+ warning[-Wanalyzer-possible-null-dereference]:
+  dereference of possibly-NULL ‘clipped_regions’
+
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor_largepixmap.c:1175:9:
+ warning[-Wanalyzer-possible-null-dereference]:
+  dereference of possibly-NULL ‘source_pixmap_priv’
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 84cf20e6ddacbfc62637f156a92d673574c43604)
+(cherry picked from commit cdc7efe75f45b4c5fa3a9aa06c3a616d70b63b30)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ glamor/glamor_largepixmap.c | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/glamor/glamor_largepixmap.c b/glamor/glamor_largepixmap.c
+index 57760f8d3..334a20cb1 100644
+--- a/glamor/glamor_largepixmap.c
++++ b/glamor/glamor_largepixmap.c
+@@ -77,6 +77,10 @@ __glamor_compute_clipped_regions(int block_w,
+     clipped_regions = calloc((end_block_x - start_block_x + 1)
+                              * (end_block_y - start_block_y + 1),
+                              sizeof(*clipped_regions));
++    if (clipped_regions == NULL) {
++        *n_region = 0;
++        return NULL;
++    }
+ 
+     DEBUGF("startx %d starty %d endx %d endy %d \n",
+            start_x, start_y, end_x, end_y);
+@@ -216,6 +220,11 @@ glamor_compute_clipped_regions_ext(PixmapPtr pixmap,
+                                inner_block_w)
+                             * ((block_h + inner_block_h - 1) /
+                                inner_block_h), sizeof(*result_regions));
++    if (result_regions == NULL) {
++        *n_region = 0;
++        free(clipped_regions);
++        return NULL;
++    }
+     k = 0;
+     for (i = 0; i < *n_region; i++) {
+         x = box_array[clipped_regions[i].block_idx].x1;
+@@ -362,10 +371,14 @@ _glamor_compute_clipped_regions(PixmapPtr pixmap,
+     DEBUGRegionPrint(region);
+     if (glamor_pixmap_priv_is_small(pixmap_priv)) {
+         clipped_regions = calloc(1, sizeof(*clipped_regions));
+-        clipped_regions[0].region = RegionCreate(NULL, 1);
+-        clipped_regions[0].block_idx = 0;
+-        RegionCopy(clipped_regions[0].region, region);
+-        *n_region = 1;
++        if (clipped_regions) {
++            clipped_regions[0].region = RegionCreate(NULL, 1);
++            clipped_regions[0].block_idx = 0;
++            RegionCopy(clipped_regions[0].region, region);
++            *n_region = 1;
++        }
++        else
++            *n_region = 0;
+         return clipped_regions;
+     }
+ 
+@@ -1172,6 +1185,8 @@ glamor_composite_largepixmap_region(CARD8 op,
+         /* XXX self-copy... */
+         need_free_source_pixmap_priv = source_pixmap_priv;
+         source_pixmap_priv = malloc(sizeof(*source_pixmap_priv));
++        if (source_pixmap_priv == NULL)
++            return FALSE;
+         *source_pixmap_priv = *need_free_source_pixmap_priv;
+         need_free_source_pixmap_priv = source_pixmap_priv;
+     }
+-- 
+2.54.0
+

diff --git a/0012-glamor-avoid-null-dereference-in-glamor_dash_setup.patch b/0012-glamor-avoid-null-dereference-in-glamor_dash_setup.patch
new file mode 100644
index 0000000..3278882
--- /dev/null
+++ b/0012-glamor-avoid-null-dereference-in-glamor_dash_setup.patch
@@ -0,0 +1,39 @@
+From 0ef7c3716d9373617acd26bc5249cf5ed15a1dab Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue, 28 Oct 2025 18:16:00 -0700
+Subject: [PATCH xserver 12/31] glamor: avoid null dereference in
+ glamor_dash_setup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported in #1817:
+
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor_dash.c:152:10:
+ warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit c6522229b86f9087347b17280b6e5f19345baf9a)
+(cherry picked from commit 84dccbc45a5cbc6fe4583cc946460c12c749ec70)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ glamor/glamor_dash.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glamor/glamor_dash.c b/glamor/glamor_dash.c
+index 828969d91..74252de33 100644
+--- a/glamor/glamor_dash.c
++++ b/glamor/glamor_dash.c
+@@ -149,7 +149,7 @@ glamor_dash_setup(DrawablePtr drawable, GCPtr gc)
+     dash_pixmap = glamor_get_dash_pixmap(gc);
+     dash_priv = glamor_get_pixmap_private(dash_pixmap);
+ 
+-    if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv))
++    if (!dash_priv || !GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv))
+         goto bail;
+ 
+     glamor_make_current(glamor_priv);
+-- 
+2.54.0
+

diff --git a/0012-glamor-size-tmp_bits-buffer-for-source-coordinate-ra.patch b/0012-glamor-size-tmp_bits-buffer-for-source-coordinate-ra.patch
new file mode 100644
index 0000000..d1236d5
--- /dev/null
+++ b/0012-glamor-size-tmp_bits-buffer-for-source-coordinate-ra.patch
@@ -0,0 +1,57 @@
+From d6deb27b655abae79396bf3aedc2937a10ae2d4f Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 26 Aug 2026 17:17:21 +1000
+Subject: [PATCH xserver 12/12] glamor: size tmp_bits buffer for source
+ coordinate range in upload_boxes
+
+glamor_upload_boxes() allocates the tmp_bits buffer (used for 24-bit to
+32-bit depth conversion) based on the destination pixmap height, but
+indexes it using source coordinates (y1 - dy_dst + dy_src). When the
+source is taller than the destination, the source-relative offset
+exceeds the destination height, causing writes past the buffer end.
+
+Size the buffer to account for the source coordinate mapping:
+byte_stride * (pixmap->drawable.height - dy_dst + dy_src). This
+ensures the buffer covers the full range of source rows that will be
+accessed during the upload.
+
+This vulnerability was discovered by:
+  Anonymous working with TrendAI Zero Day Initiative
+
+ZDI-CAN-32361
+
+CVE-2026-93522
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+Assisted-by: Claude:claude-opus-4-6
+(cherry picked from commit ad26c26bf795e6464f74c8ef5bb1d41403d877ab)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2345>
+---
+ glamor/glamor_transfer.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/glamor/glamor_transfer.c b/glamor/glamor_transfer.c
+index 77c60d06f..b91c758cd 100644
+--- a/glamor/glamor_transfer.c
++++ b/glamor/glamor_transfer.c
+@@ -41,8 +41,14 @@ glamor_upload_boxes(DrawablePtr drawable, BoxPtr in_boxes, int in_nbox,
+     int                         bytes_per_pixel = PICT_FORMAT_BPP(f->render_format) >> 3;
+     char *tmp_bits = NULL;
+ 
+-    if (glamor_drawable_effective_depth(drawable) == 24 && pixmap->drawable.depth == 32)
+-        tmp_bits = xnfalloc(byte_stride * pixmap->drawable.height);
++    if (glamor_drawable_effective_depth(drawable) == 24 && pixmap->drawable.depth == 32) {
++        int tmp_height = pixmap->drawable.height - dy_dst + dy_src;
++        if (tmp_height > 0) {
++            if (byte_stride > 0 && tmp_height > INT_MAX / byte_stride)
++                return;
++            tmp_bits = xnfalloc(byte_stride * tmp_height);
++        }
++    }
+ 
+     glamor_make_current(glamor_priv);
+ 
+-- 
+2.56.0
+

diff --git a/0013-glamor-avoid-null-dereference-in-glamor_composite_cl.patch b/0013-glamor-avoid-null-dereference-in-glamor_composite_cl.patch
new file mode 100644
index 0000000..d4aabe3
--- /dev/null
+++ b/0013-glamor-avoid-null-dereference-in-glamor_composite_cl.patch
@@ -0,0 +1,39 @@
+From 419f81c69396e5ccf84d43acb42eb788447b1f19 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 2 Nov 2025 11:23:37 -0800
+Subject: [PATCH xserver 13/31] glamor: avoid null dereference in
+ glamor_composite_clipped_region()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported in #1817:
+
+xwayland-24.1.6/redhat-linux-build/../glamor/glamor_render.c:1577:21:
+ warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 6a4ec30af49bcbf61cf8ebc3a8f5541abac9024d)
+(cherry picked from commit 2df83c556674c1cc855b5a8df29ab46cc8581d4f)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ glamor/glamor_render.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
+index 1bcf01102..1208b49a7 100644
+--- a/glamor/glamor_render.c
++++ b/glamor/glamor_render.c
+@@ -1573,7 +1573,7 @@ glamor_composite_clipped_region(CARD8 op,
+     if (source
+         && ((!source->pDrawable
+              && (source->pSourcePict->type != SourcePictTypeSolidFill))
+-            || (source->pDrawable
++            || (source->pDrawable && source_pixmap
+                 && !GLAMOR_PIXMAP_PRIV_HAS_FBO(source_pixmap_priv)
+                 && (source_pixmap->drawable.width != width
+                     || source_pixmap->drawable.height != height)))) {
+-- 
+2.54.0
+

diff --git a/0014-glamor-avoid-double-free-in-glamor_make_pixmap_expor.patch b/0014-glamor-avoid-double-free-in-glamor_make_pixmap_expor.patch
new file mode 100644
index 0000000..631c117
--- /dev/null
+++ b/0014-glamor-avoid-double-free-in-glamor_make_pixmap_expor.patch
@@ -0,0 +1,50 @@
+From eafb70502722a5ec61ae34f2ed1d18830f00d491 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 2 Nov 2025 12:16:56 -0800
+Subject: [PATCH xserver 14/31] glamor: avoid double free in
+ glamor_make_pixmap_exportable()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Reported by gcc 15.1:
+
+../glamor/glamor_egl.c:320:9:
+ warning: double-‘free’ of ‘modifiers’ [CWE-415] [-Wanalyzer-double-free]
+[...]
+           │  732 |│        free(*modifiers);
+           │      |│        ~~~~~~~~~~~~~~~~
+           │      |│        |
+           │      |└───────>(25) ...to here
+           │      |         (26) first ‘free’ here
+[...]
+    │  320 |         free(modifiers);
+    │      |         ~~~~~~~~~~~~~~~
+    │      |         |
+    │      |         (28) ⚠️  second ‘free’ here; first ‘free’ was at (26)
+
+Fixes: cef12efc1 ("glamor: Implement GetSupportedModifiers")
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 3e9baa20f39b0502efdaf48c2ca7e2f58d1e3120)
+(cherry picked from commit 46ad1628150724562b9c95b81347aa32b223d300)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ glamor/glamor_egl.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
+index 136033a9a..87da35a2c 100644
+--- a/glamor/glamor_egl.c
++++ b/glamor/glamor_egl.c
+@@ -730,6 +730,7 @@ glamor_get_modifiers(ScreenPtr screen, uint32_t format,
+     if (!eglQueryDmaBufModifiersEXT(glamor_egl->display, format, num,
+                                     (EGLuint64KHR *) *modifiers, NULL, &num)) {
+         free(*modifiers);
++        *modifiers = NULL;
+         return FALSE;
+     }
+ 
+-- 
+2.54.0
+

diff --git a/0015-dix-set-errorValue-correctly-when-XID-lookup-fails-i.patch b/0015-dix-set-errorValue-correctly-when-XID-lookup-fails-i.patch
new file mode 100644
index 0000000..d93d62e
--- /dev/null
+++ b/0015-dix-set-errorValue-correctly-when-XID-lookup-fails-i.patch
@@ -0,0 +1,53 @@
+From d0aed694f38cea740d41ce34e1cec97e5ac1e854 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sun, 7 Dec 2025 15:57:53 -0800
+Subject: [PATCH xserver 15/31] dix: set errorValue correctly when XID lookup
+ fails in ChangeGCXIDs()
+
+dixLookupResourceByType always overwrites the pointer passed in as the
+first arg, so we shouldn't use the union it's in after that to get the
+requested XID value to put in the errorValue.
+
+Closes: #1857
+Fixes: 2d7eb4a19 ("Pre-validate ChangeGC XIDs.")
+Reported-by: Mouse <mouse@Rodents-Montreal.ORG>
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit ac42c39145849588544ad10812e5a8ae76bf1114)
+(cherry picked from commit 7f1050de78239daa643483f719ba9cecdf427265)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ dix/gc.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/dix/gc.c b/dix/gc.c
+index 47bab00bd..43244895a 100644
+--- a/dix/gc.c
++++ b/dix/gc.c
+@@ -441,6 +441,7 @@ ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32)
+         vals[i].val = pC32[i];
+     for (i = 0; i < ARRAY_SIZE(xidfields); ++i) {
+         int offset, rc;
++        XID id;
+ 
+         if (!(mask & xidfields[i].mask))
+             continue;
+@@ -449,11 +450,13 @@ ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32)
+             vals[offset].ptr = NullPixmap;
+             continue;
+         }
+-        rc = dixLookupResourceByType(&vals[offset].ptr, vals[offset].val,
++        /* save the id, since dixLookupResourceByType overwrites &vals[offset] */
++        id = vals[offset].val;
++        rc = dixLookupResourceByType(&vals[offset].ptr, id,
+                                      xidfields[i].type, client,
+                                      xidfields[i].access_mode);
+         if (rc != Success) {
+-            client->errorValue = vals[offset].val;
++            client->errorValue = id;
+             return rc;
+         }
+     }
+-- 
+2.54.0
+

diff --git a/0016-os-avoid-closing-null-fd-at-Fopen.patch b/0016-os-avoid-closing-null-fd-at-Fopen.patch
new file mode 100644
index 0000000..15544e3
--- /dev/null
+++ b/0016-os-avoid-closing-null-fd-at-Fopen.patch
@@ -0,0 +1,41 @@
+From b72fcbeb0a5764a5bdee002a08d3ff4e8a96f737 Mon Sep 17 00:00:00 2001
+From: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+Date: Wed, 17 Dec 2025 11:52:16 +0300
+Subject: [PATCH xserver 16/31] os: avoid closing null fd at Fopen
+
+In `Fopen` function variable `iop` may store NULL as a result of `fopen`
+call. In this case, if later privileges couldn't be restored (`seteuid`
+call fails), further `fclose(iop)` call will cause runtime error.
+
+This commit adds check `iop` for NULL before calling `fclose` to prevent
+potential NULL pointer dereference.
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE.
+
+Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+(cherry picked from commit f83807647e171def9244a7f1d8d9af8e8e79f847)
+(cherry picked from commit dd2255c309ca8912e33c2f445c636f987e2b2088)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ os/utils.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/os/utils.c b/os/utils.c
+index df56b5b9b..c1e280b35 100644
+--- a/os/utils.c
++++ b/os/utils.c
+@@ -1406,7 +1406,9 @@ Fopen(const char *file, const char *type)
+     iop = fopen(file, type);
+ 
+     if (seteuid(euid) == -1) {
+-        fclose(iop);
++        if (iop) {
++            fclose(iop);
++        }
+         return NULL;
+     }
+     return iop;
+-- 
+2.54.0
+

diff --git a/0017-os-make-FormatInt64-handle-LONG_MIN-correctly.patch b/0017-os-make-FormatInt64-handle-LONG_MIN-correctly.patch
new file mode 100644
index 0000000..b8a1837
--- /dev/null
+++ b/0017-os-make-FormatInt64-handle-LONG_MIN-correctly.patch
@@ -0,0 +1,49 @@
+From b1c4967e1909b5ba507fd7198fff669b9e759e80 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri, 19 Dec 2025 17:10:43 -0800
+Subject: [PATCH xserver 17/31] os: make FormatInt64() handle LONG_MIN
+ correctly
+
+When compiling with gcc 15.2.0 using -O3 -m64 on Solaris SPARC & x64,
+we'd get a test failure of:
+
+Assertion failed: strcmp(logmsg, expected) == 0,
+ file ../test/signal-logging.c, line 339, function logging_format
+
+because 'num *= 1' produced a value that was out of the range of the
+int64_t it was being stored in.  (Compiling with -O2 worked fine with
+the same compiler/configuration/platform though.)
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 7f68b588657ea14050971efa86682e55e2c7e21b)
+(cherry picked from commit 3eac9393d734a1aa8342179f98e30569da70db95)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ os/fmt.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/os/fmt.c b/os/fmt.c
+index c5c61bdba..7bda7014a 100644
+--- a/os/fmt.c
++++ b/os/fmt.c
+@@ -16,12 +16,14 @@
+ void
+ FormatInt64(int64_t num, char *string)
+ {
++    uint64_t unum = num;
++
+     if (num < 0) {
+         string[0] = '-';
+-        num *= -1;
++        unum = num * -1;
+         string++;
+     }
+-    FormatUInt64(num, string);
++    FormatUInt64(unum, string);
+ }
+ 
+ /* Format a number into a string in a signal safe manner. The string should be
+-- 
+2.54.0
+

diff --git a/0018-xwayland-wrong-expecting_event.patch b/0018-xwayland-wrong-expecting_event.patch
new file mode 100644
index 0000000..9cbf2ad
--- /dev/null
+++ b/0018-xwayland-wrong-expecting_event.patch
@@ -0,0 +1,61 @@
+From b0b157607016b45848a714aea31586f6e9a3927b Mon Sep 17 00:00:00 2001
+From: Yixue Wang <yixue.wang@outlook.com>
+Date: Wed, 28 Jan 2026 16:11:23 +0800
+Subject: [PATCH xserver 18/31] xwayland: wrong expecting_event
+
+According to
+
+https://wayland.app/protocols/wayland#wl_seat:event:capabilities
+
+Compositor might send capabilities when its capabilities change.
+Decrease expecting_event here without any check might cause a
+negative expecting_count.
+
+(cherry picked from commit 6bf6a9bff293fc1b26024d27d444829c945d3f0e)
+(cherry picked from commit 6a37e21ca4bd650568a42c820470bf710937627e)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ hw/xwayland/xwayland-input.c | 6 +++++-
+ hw/xwayland/xwayland-input.h | 1 +
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c
+index 766f11ff9..0d02b1b80 100644
+--- a/hw/xwayland/xwayland-input.c
++++ b/hw/xwayland/xwayland-input.c
+@@ -1916,7 +1916,10 @@ seat_handle_capabilities(void *data, struct wl_seat *seat,
+         release_touch(xwl_seat);
+     }
+ 
+-    xwl_seat->xwl_screen->expecting_event--;
++    if (xwl_seat->caps_initialized == FALSE) {
++        xwl_seat->caps_initialized = TRUE;
++        xwl_seat->xwl_screen->expecting_event--;
++    }
+ }
+ 
+ static void
+@@ -1967,6 +1970,7 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version
+         wl_registry_bind(xwl_screen->registry, id,
+                          &wl_seat_interface, min(version, seat_version));
+     xwl_seat->id = id;
++    xwl_seat->caps_initialized = FALSE;
+ 
+     xwl_cursor_init(&xwl_seat->cursor, xwl_seat->xwl_screen,
+                     xwl_seat_update_cursor);
+diff --git a/hw/xwayland/xwayland-input.h b/hw/xwayland/xwayland-input.h
+index 0a742f017..ef1198adf 100644
+--- a/hw/xwayland/xwayland-input.h
++++ b/hw/xwayland/xwayland-input.h
+@@ -76,6 +76,7 @@ struct xwl_seat {
+     struct xwl_window *tablet_focus_window;
+     uint32_t id;
+     uint32_t pointer_enter_serial;
++    Bool caps_initialized;
+     struct xorg_list link;
+     CursorPtr x_cursor;
+     OsTimerPtr x_cursor_timer;
+-- 
+2.54.0
+

diff --git a/0019-render-fix-multiple-mem-leaks-on-err-paths.patch b/0019-render-fix-multiple-mem-leaks-on-err-paths.patch
new file mode 100644
index 0000000..599a43e
--- /dev/null
+++ b/0019-render-fix-multiple-mem-leaks-on-err-paths.patch
@@ -0,0 +1,50 @@
+From b7ba6b5c61e9ee799881db8d5901311bc1a69013 Mon Sep 17 00:00:00 2001
+From: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+Date: Thu, 5 Feb 2026 16:07:43 +0300
+Subject: [PATCH xserver 19/31] render: fix multiple mem leaks on err paths
+
+Free nested allocations when initialization fails.
+Several code paths returned early on error without releasing
+memory owned by embedded structures, leading to leaks.
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE.
+
+Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+(cherry picked from commit 809402414e4b84ad5c084221c7b4da9bd2c5d55d)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ render/picture.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/render/picture.c b/render/picture.c
+index 6cc3e7e4c..b2ceed55e 100644
+--- a/render/picture.c
++++ b/render/picture.c
+@@ -913,6 +913,7 @@ CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2,
+ 
+     initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
+     if (*error) {
++        free(pPicture->pSourcePict);
+         free(pPicture);
+         return 0;
+     }
+@@ -958,6 +959,7 @@ CreateRadialGradientPicture(Picture pid, xPointFixed * inner,
+ 
+     initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
+     if (*error) {
++        free(pPicture->pSourcePict);
+         free(pPicture);
+         return 0;
+     }
+@@ -996,6 +998,7 @@ CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle,
+ 
+     initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
+     if (*error) {
++        free(pPicture->pSourcePict);
+         free(pPicture);
+         return 0;
+     }
+-- 
+2.54.0
+

diff --git a/0020-dix-avoid-null-ptr-deref-at-doListFontsAndAliases.patch b/0020-dix-avoid-null-ptr-deref-at-doListFontsAndAliases.patch
new file mode 100644
index 0000000..fac6895
--- /dev/null
+++ b/0020-dix-avoid-null-ptr-deref-at-doListFontsAndAliases.patch
@@ -0,0 +1,52 @@
+From 8c4ee3208646798edd4f13b0e735e289124eae27 Mon Sep 17 00:00:00 2001
+From: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+Date: Wed, 17 Dec 2025 11:15:27 +0300
+Subject: [PATCH xserver 20/31] dix: avoid null ptr deref at
+ doListFontsAndAliases
+
+In the `doListFontsAndAliases` function in dixfonts.c, when a font alias
+is encountered (`err == FontNameAlias`) as a result of
+`list_next_font_or_alias` call, the code allocates memory for
+`resolved` variable (`resolvedlen + 1` bytes) for storing target font
+name. In this case, if the `malloc(resolvedlen + 1)` call fails,
+`resolved` remains NULL.
+
+Later, when check (`else if (err == FontNameAlias)`) is TRUE, the code
+uses `memcpy` to copy nullable `resolved` into `tmp_pattern` without
+checking if `resolved` is NULL, so there is a potential null ptr
+dereference.
+
+This commit replaces `malloc` with `XNFalloc` for allocating memory for
+`resolved`. `XNFalloc` will internally check result of `malloc` and stop
+program execution if allocation was failed, preventing potential NULL
+dereferencing.
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE.
+
+Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+(cherry picked from commit 0237462d326c78868c83b6eda35a9d35725f3b33)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ dix/dixfonts.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/dix/dixfonts.c b/dix/dixfonts.c
+index d25aef0e0..b7eb09f38 100644
+--- a/dix/dixfonts.c
++++ b/dix/dixfonts.c
+@@ -639,9 +639,8 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
+                 }
+                 if (err == FontNameAlias) {
+                     free(resolved);
+-                    resolved = malloc(resolvedlen + 1);
+-                    if (resolved)
+-                        memcpy(resolved, tmpname, resolvedlen + 1);
++                    resolved = XNFalloc(resolvedlen + 1);
++                    memcpy(resolved, tmpname, resolvedlen + 1);
+                 }
+             }
+ 
+-- 
+2.54.0
+

diff --git a/0021-randr-clear-primary-screen-s-primaryOutput-when-the-.patch b/0021-randr-clear-primary-screen-s-primaryOutput-when-the-.patch
new file mode 100644
index 0000000..2e3e562
--- /dev/null
+++ b/0021-randr-clear-primary-screen-s-primaryOutput-when-the-.patch
@@ -0,0 +1,59 @@
+From a6871546b88861e83127792ec202b03d9d73afa1 Mon Sep 17 00:00:00 2001
+From: hongao <hongao@uniontech.com>
+Date: Wed, 15 May 2024 14:35:23 +0800
+Subject: [PATCH xserver 21/31] randr: clear primary screen's primaryOutput
+ when the output is deleted
+
+This fix use after free when a pluggable gpu screen (such as displaylink)
+was set as primary screen and unpluged.
+
+gdb backtrace:
+ #0 OssigHandler (signo=11, sip=0x7fff2e0a50f0, unused=0x7fff2e0a4fc0) at ../../../../os/osinit.c:138
+ #1 <signal handler called>
+ #2 rrGetscreenResources (client=0x3195160, query=0) at ../../../../randr/rrscreen.c:577
+ #3 0x0000000000562bae in ProcRRGetscreenResourcesCurrent (client=0x3195160) at ../../../../randr/rrscreen.c:652
+ #4 OxOOOOB0000054de63 in ProcRRDispatch (client=0x3195160) at ../../../../randr/randr.c:717
+ #5 0x00000000004322c6 in Dispatch () at ../../../../dix/dispatch.c:485
+ #6 0x0900900990443139 in dix_main (argc=12, argv=0x7fff2e0a5f78, envp=0x7fff2e0a5fe0) at ../../../../dix/main.c:276
+ #7 0X0000000000421d9a in main (argc=12, argv=0x7fff2e0a5f78, envp=0x7fff2e0a5fe0) at ../../../../dix/stubmain.c:34
+
+Signed-off-by: hongao <hongao@uniontech.com>
+(cherry picked from commit 1443fd34ea37e8c7cedfac446e4a34205c5fbbb0)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ randr/rroutput.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/randr/rroutput.c b/randr/rroutput.c
+index 18003c92e..0af9c47ac 100644
+--- a/randr/rroutput.c
++++ b/randr/rroutput.c
+@@ -374,6 +374,8 @@ RROutputDestroyResource(void *value, XID pid)
+ {
+     RROutputPtr output = (RROutputPtr) value;
+     ScreenPtr pScreen = output->pScreen;
++    ScreenPtr primary;
++    rrScrPrivPtr primarysp;
+     int m;
+ 
+     if (pScreen) {
+@@ -394,6 +396,15 @@ RROutputDestroyResource(void *value, XID pid)
+         if (pScrPriv->primaryOutput == output)
+             pScrPriv->primaryOutput = NULL;
+ 
++        if (pScreen->isGPU) {
++            primary = pScreen->current_primary;
++            if (primary) {
++                primarysp = rrGetScrPriv(primary);
++                if (primarysp->primaryOutput == output)
++                    primarysp->primaryOutput = NULL;
++            }
++        }
++
+         for (i = 0; i < pScrPriv->numOutputs; i++) {
+             if (pScrPriv->outputs[i] == output) {
+                 memmove(pScrPriv->outputs + i, pScrPriv->outputs + i + 1,
+-- 
+2.54.0
+

diff --git a/0022-os-include-assert.h-in-ospoll.c.patch b/0022-os-include-assert.h-in-ospoll.c.patch
new file mode 100644
index 0000000..4fd405e
--- /dev/null
+++ b/0022-os-include-assert.h-in-ospoll.c.patch
@@ -0,0 +1,48 @@
+From 5ed70b3153590cd21a9c2fc686dbce425f6fee59 Mon Sep 17 00:00:00 2001
+From: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat, 14 Mar 2026 17:06:28 -0700
+Subject: [PATCH xserver 22/31] os: include <assert.h> in ospoll.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes build failure in mingw-cross-build:
+
+../os/ospoll.c: In function ‘ospoll_destroy’:
+../os/ospoll.c:266:9: error: implicit declaration of function ‘assert’
+ [-Werror=implicit-function-declaration]
+  266 |         assert (ospoll->num == 0);
+      |         ^~~~~~
+../os/ospoll.c:59:1: note: ‘assert’ is defined in header ‘<assert.h>’;
+ did you forget to ‘#include <assert.h>’?
+   58 | #include "xserver_poll.h"
+  +++ |+#include <assert.h>
+   59 | #define POLL            1
+../os/ospoll.c:266:9: warning: nested extern declaration of ‘assert’
+ [-Wnested-externs]
+  266 |         assert (ospoll->num == 0);
+      |         ^~~~~~
+
+Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+(cherry picked from commit 7f8570bfa16bd41e4536385b46742cc316546529)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2151>
+---
+ os/ospoll.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/os/ospoll.c b/os/ospoll.c
+index c68aabc87..c5e0de931 100644
+--- a/os/ospoll.c
++++ b/os/ospoll.c
+@@ -24,6 +24,7 @@
+ #include <dix-config.h>
+ #endif
+ 
++#include <assert.h>
+ #include <X11/X.h>
+ #include <X11/Xproto.h>
+ #include <stdlib.h>
+-- 
+2.54.0
+

diff --git a/0023-xkb-fix-incorrect-size-check-when-growing-doodads-in.patch b/0023-xkb-fix-incorrect-size-check-when-growing-doodads-in.patch
new file mode 100644
index 0000000..9076e72
--- /dev/null
+++ b/0023-xkb-fix-incorrect-size-check-when-growing-doodads-in.patch
@@ -0,0 +1,41 @@
+From bbb0fd26551ed0a16299ea1fc6a0c6eb48efcdca Mon Sep 17 00:00:00 2001
+From: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+Date: Tue, 14 Apr 2026 12:06:51 +0300
+Subject: [PATCH xserver 23/31] xkb: fix incorrect size check when growing
+ doodads in a section
+
+In XkbAddGeomDoodad(), when adding a doodad to a specific section
+(section != NULL), there is a comparison between section->num_doodads
+and geom->sz_doodads instead of the section's own section->sz_doodads.
+
+The else branch (global geometry doodads) was already correct.
+
+Compare section->num_doodads against section->sz_doodads to prevent
+a potential out-of-bounds.
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE.
+
+Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+(cherry picked from commit dd8b8cf49d326802c53b01835618a7e3765d91cb)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ xkb/XKBGAlloc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
+index f0cda24fe..9b71f6121 100644
+--- a/xkb/XKBGAlloc.c
++++ b/xkb/XKBGAlloc.c
+@@ -769,7 +769,7 @@ XkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name)
+             return doodad;
+     }
+     if (section) {
+-        if ((section->num_doodads >= geom->sz_doodads) &&
++        if ((section->num_doodads >= section->sz_doodads) &&
+             (_XkbAllocDoodads(section, 1) != Success)) {
+             return NULL;
+         }
+-- 
+2.54.0
+

diff --git a/0024-xkb-fix-potential-buff-overflow-in-XkbVModIndexText-.patch b/0024-xkb-fix-potential-buff-overflow-in-XkbVModIndexText-.patch
new file mode 100644
index 0000000..6f1bc28
--- /dev/null
+++ b/0024-xkb-fix-potential-buff-overflow-in-XkbVModIndexText-.patch
@@ -0,0 +1,43 @@
+From e4706cb4a94bbdc679c5588d979bde8721a0c70b Mon Sep 17 00:00:00 2001
+From: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+Date: Tue, 14 Apr 2026 13:22:35 +0300
+Subject: [PATCH xserver 24/31] xkb: fix potential buff overflow in
+ XkbVModIndexText for XkbCFile format
+
+len calculation and strncpy limit were off by one when prefixing
+"vmod_" to the virtual modifier name. This could write the final
+NULL one byte past the allocated buffer from tbGetBuffer().
+
+Use proper allocation len for prefix to avoid writing out-of-bounds.
+
+Found by Linux Verification Center (linuxtesting.org) with SVACE
+
+Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
+(cherry picked from commit 5dfb435c1d864bf154369cb86d085d4159730378)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ xkb/xkbtext.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
+index d6f688f5c..8fb61137f 100644
+--- a/xkb/xkbtext.c
++++ b/xkb/xkbtext.c
+@@ -138,11 +138,11 @@ XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format)
+ 
+     len = strlen(tmp) + 1;
+     if (format == XkbCFile)
+-        len += 4;
++        len += 5;
+     rtrn = tbGetBuffer(len);
+     if (format == XkbCFile) {
+         strcpy(rtrn, "vmod_");
+-        strncpy(&rtrn[5], tmp, len - 4);
++        strncpy(&rtrn[5], tmp, len - 5);
+     }
+     else
+         strncpy(rtrn, tmp, len);
+-- 
+2.54.0
+

diff --git a/0025-Xi-add-missing-gesture-grab-type-checks-in-ProcXIPas.patch b/0025-Xi-add-missing-gesture-grab-type-checks-in-ProcXIPas.patch
new file mode 100644
index 0000000..bdb0108
--- /dev/null
+++ b/0025-Xi-add-missing-gesture-grab-type-checks-in-ProcXIPas.patch
@@ -0,0 +1,37 @@
+From 5f73a5cf77a512117234adbbc2e3988479609200 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 29 Apr 2026 05:59:12 +0000
+Subject: [PATCH xserver 25/31] Xi: add missing gesture grab type checks in
+ ProcXIPassiveUngrabDevice
+
+ProcXIPassiveUngrabDevice was missing XIGrabtypeGesturePinchBegin and
+XIGrabtypeGestureSwipeBegin from its detail!=0 rejection check. The
+corresponding ProcXIPassiveGrabDevice function correctly includes
+these gesture types.
+
+Assisted-by: Claude:claude-claude-opus-4-6
+(cherry picked from commit 90954812496770f4903a024cb610404a8dd882ad)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ Xi/xipassivegrab.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
+index 896233bec..2f22e64f6 100644
+--- a/Xi/xipassivegrab.c
++++ b/Xi/xipassivegrab.c
+@@ -332,7 +332,9 @@ ProcXIPassiveUngrabDevice(ClientPtr client)
+ 
+     if ((stuff->grab_type == XIGrabtypeEnter ||
+          stuff->grab_type == XIGrabtypeFocusIn ||
+-         stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0) {
++         stuff->grab_type == XIGrabtypeTouchBegin ||
++         stuff->grab_type == XIGrabtypeGesturePinchBegin ||
++         stuff->grab_type == XIGrabtypeGestureSwipeBegin) && stuff->detail != 0) {
+         client->errorValue = stuff->detail;
+         return BadValue;
+     }
+-- 
+2.54.0
+

diff --git a/0026-xkb-Fix-out-of-bounds-array-access-in-_CheckSetShape.patch b/0026-xkb-Fix-out-of-bounds-array-access-in-_CheckSetShape.patch
new file mode 100644
index 0000000..78a67fd
--- /dev/null
+++ b/0026-xkb-Fix-out-of-bounds-array-access-in-_CheckSetShape.patch
@@ -0,0 +1,52 @@
+From 342245c9b2c5f813dfecdc08eb2a7863bebcebb4 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sat, 18 Apr 2026 07:34:51 +1000
+Subject: [PATCH xserver 26/31] xkb: Fix out-of-bounds array access in
+ _CheckSetShapes()
+
+The primaryNdx and approxNdx fields in the shape wire description are
+attacker-controlled CARD8 values from the client request. They are used
+to index into the shape->outlines[] array, but were only checked against
+XkbNoShape (0xff) and never validated against the actual number of
+outlines (shapeWire->nOutlines).
+
+Assisted-by: Claude:claude-claude-opus-4-6
+(cherry picked from commit 86a321ad98213957bbb56f295417b0939326718b)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ xkb/xkb.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index c2b845197..5ab6a3f52 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -5565,10 +5565,22 @@ _CheckSetShapes(XkbGeometryPtr geom,
+                 ol->num_points = olWire->nPoints;
+                 olWire = (xkbOutlineWireDesc *)ptWire;
+             }
+-            if (shapeWire->primaryNdx != XkbNoShape)
++            if (shapeWire->primaryNdx != XkbNoShape) {
++                if (shapeWire->primaryNdx >= shapeWire->nOutlines) {
++                    client->errorValue = _XkbErrCode3(0x08, shapeWire->primaryNdx,
++                                                      shapeWire->nOutlines);
++                    return BadValue;
++                }
+                 shape->primary = &shape->outlines[shapeWire->primaryNdx];
+-            if (shapeWire->approxNdx != XkbNoShape)
++            }
++            if (shapeWire->approxNdx != XkbNoShape) {
++                if (shapeWire->approxNdx >= shapeWire->nOutlines) {
++                    client->errorValue = _XkbErrCode3(0x08, shapeWire->approxNdx,
++                                                      shapeWire->nOutlines);
++                    return BadValue;
++                }
+                 shape->approx = &shape->outlines[shapeWire->approxNdx];
++            }
+             shapeWire = (xkbShapeWireDesc *) olWire;
+         }
+         wire = (char *) shapeWire;
+-- 
+2.54.0
+

diff --git a/0027-xkb-Fix-off-by-one-in-color-index-validation-in-_Che.patch b/0027-xkb-Fix-off-by-one-in-color-index-validation-in-_Che.patch
new file mode 100644
index 0000000..70a70ef
--- /dev/null
+++ b/0027-xkb-Fix-off-by-one-in-color-index-validation-in-_Che.patch
@@ -0,0 +1,41 @@
+From d8103cb20b5e034c402722d66c6b1a1114f5e419 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sat, 18 Apr 2026 07:35:15 +1000
+Subject: [PATCH xserver 27/31] xkb: Fix off-by-one in color index validation
+ in _CheckSetGeom()
+
+The bounds checks for baseColorNdx and labelColorNdx in _CheckSetGeom()
+use '>' instead of '>=' when comparing against req->nColors. Since
+nColors is a count and valid indices are 0 to nColors-1, an index equal
+to nColors is one past the end of the array.
+
+Assisted-by: Claude:claude-claude-opus-4-6
+(cherry picked from commit 6b6e8020b902e48e3330f9a54cd439a51988bc50)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ xkb/xkb.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 5ab6a3f52..08a966647 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -5630,12 +5630,12 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client)
+         client->errorValue = _XkbErrCode3(0x01, 2, req->nColors);
+         return BadValue;
+     }
+-    if (req->baseColorNdx > req->nColors) {
++    if (req->baseColorNdx >= req->nColors) {
+         client->errorValue =
+             _XkbErrCode3(0x03, req->nColors, req->baseColorNdx);
+         return BadMatch;
+     }
+-    if (req->labelColorNdx > req->nColors) {
++    if (req->labelColorNdx >= req->nColors) {
+         client->errorValue =
+             _XkbErrCode3(0x03, req->nColors, req->labelColorNdx);
+         return BadMatch;
+-- 
+2.54.0
+

diff --git a/0028-xkb-Fix-off-by-one-and-NULL-dereferences-in-_CheckSe.patch b/0028-xkb-Fix-off-by-one-and-NULL-dereferences-in-_CheckSe.patch
new file mode 100644
index 0000000..425c246
--- /dev/null
+++ b/0028-xkb-Fix-off-by-one-and-NULL-dereferences-in-_CheckSe.patch
@@ -0,0 +1,55 @@
+From 9c0aaf0e0582838d997f29f659849a0ef81a2594 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sat, 18 Apr 2026 07:35:53 +1000
+Subject: [PATCH xserver 28/31] xkb: Fix off-by-one and NULL dereferences in
+ _CheckSetOverlay()
+
+Off-by-one in rowUnder validation: the bounds check uses '>' instead
+of '>=' when comparing rWire->rowUnder against section->num_rows.
+Since num_rows is a count and valid indices are 0 to num_rows-1,
+rowUnder == num_rows passes the check but is one past the valid range.
+XkbAddGeomOverlayRow() uses this as an array index, causing an
+out-of-bounds read on section->rows[].
+
+And throw in two alloc checks while we're at it.
+
+Assisted-by: Claude:claude-claude-opus-4-6
+(cherry picked from commit ed19312c4bda0a8f66b236348ffc553e5d8d2a09)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ xkb/xkb.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 08a966647..394b744e5 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -5361,6 +5361,8 @@ _CheckSetOverlay(char **wire_inout, xkbSetGeometryReq *req,
+     }
+     CHK_ATOM_ONLY(olWire->name);
+     ol = XkbAddGeomOverlay(section, olWire->name, olWire->nRows);
++    if (!ol)
++        return BadAlloc;
+     rWire = (xkbOverlayRowWireDesc *) &olWire[1];
+     for (r = 0; r < olWire->nRows; r++) {
+         register int k;
+@@ -5370,12 +5372,14 @@ _CheckSetOverlay(char **wire_inout, xkbSetGeometryReq *req,
+         if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1))
+             return BadLength;
+ 
+-        if (rWire->rowUnder > section->num_rows) {
++        if (rWire->rowUnder >= section->num_rows) {
+             client->errorValue = _XkbErrCode4(0x20, r, section->num_rows,
+                                               rWire->rowUnder);
+             return BadMatch;
+         }
+         row = XkbAddGeomOverlayRow(ol, rWire->rowUnder, rWire->nKeys);
++        if (!row)
++            return BadAlloc;
+         kWire = (xkbOverlayKeyWireDesc *) &rWire[1];
+         for (k = 0; k < rWire->nKeys; k++, kWire++) {
+             if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1))
+-- 
+2.54.0
+

diff --git a/0029-xkb-Add-bounds-check-for-action-data-in-CheckKeyActi.patch b/0029-xkb-Add-bounds-check-for-action-data-in-CheckKeyActi.patch
new file mode 100644
index 0000000..36d89a5
--- /dev/null
+++ b/0029-xkb-Add-bounds-check-for-action-data-in-CheckKeyActi.patch
@@ -0,0 +1,50 @@
+From 81b39d4e87bf5caf77634adc137195c1e9ec6728 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Sat, 18 Apr 2026 07:38:14 +1000
+Subject: [PATCH xserver 29/31] xkb: Add bounds check for action data in
+ CheckKeyActions()
+
+CheckKeyActions() validates the per-key action count bytes individually
+but does not verify that the computed total action data region falls
+within the request buffer before advancing the wire pointer past it.
+
+After the loop, the function calculates the final wire position as
+wire + nActs * sizeof(XkbAnyAction), where nActs is the sum of per-key
+action counts read from the request. The upstream length validation in
+_XkbSetMapCheckLength() uses req->totalActs from the request header,
+not the computed nActs. If a crafted request provides a totalActs value
+that passes the length check but per-key action counts that sum to a
+different nActs, the wire pointer could advance past the actual request
+buffer.
+
+The subsequent SetKeyActions() function uses memcpy to read from this
+potentially out-of-bounds region, which could leak heap data or cause
+a crash.
+
+Assisted-by: Claude:claude-claude-opus-4-6
+(cherry picked from commit a439a7340ad976983ef34eca4f537831b38e191f)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ xkb/xkb.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 394b744e5..1fe0b522a 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1862,6 +1862,11 @@ CheckKeyActions(ClientPtr client,
+     if (req->nKeyActs % 4)
+         wire += 4 - (req->nKeyActs % 4);
+     *wireRtrn = (CARD8 *) (((XkbAnyAction *) wire) + nActs);
++    if (nActs > 0 &&
++        !_XkbCheckRequestBounds(client, req, wire, *wireRtrn)) {
++        *nActsRtrn = _XkbErrCode2(0x25, nActs);
++        return 0;
++    }
+     *nActsRtrn = nActs;
+     return 1;
+ }
+-- 
+2.54.0
+

diff --git a/0030-present-actually-return-the-created-notifies.patch b/0030-present-actually-return-the-created-notifies.patch
new file mode 100644
index 0000000..cf3b325
--- /dev/null
+++ b/0030-present-actually-return-the-created-notifies.patch
@@ -0,0 +1,35 @@
+From bee67150f72f063badb6159464785d93820d5f18 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 6 May 2026 11:45:15 +1000
+Subject: [PATCH xserver 30/31] present: actually return the created notifies
+
+present_create_notifies() creates an array of notifies but never returns
+them to the caller, despite them being passed individually to
+present_add_window_notify(). The caller proceeds with a NULL notifies
+array, eventually causing an OOB in present_vblank_notify() when
+vblank->notifies is NULL.
+
+Reported-by: Feng Ning, Innora Pte. Ltd.
+(cherry picked from commit f70cc16c6831c9faa14c1f2a8588c6efb6ede263)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ present/present_notify.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/present/present_notify.c b/present/present_notify.c
+index 00b3b68bd..531b949b6 100644
+--- a/present/present_notify.c
++++ b/present/present_notify.c
+@@ -92,6 +92,8 @@ present_create_notifies(ClientPtr client, int num_notifies, xPresentNotify *x_no
+ 
+         added++;
+     }
++
++    *p_notifies = notifies;
+     return Success;
+ 
+ bail:
+-- 
+2.54.0
+

diff --git a/0031-glx-reject-negative-size-in-FeedbackBuffer-and-Selec.patch b/0031-glx-reject-negative-size-in-FeedbackBuffer-and-Selec.patch
new file mode 100644
index 0000000..1483f14
--- /dev/null
+++ b/0031-glx-reject-negative-size-in-FeedbackBuffer-and-Selec.patch
@@ -0,0 +1,70 @@
+From 7e587fcb7134088f18ec237d3db94e458107a521 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Fri, 17 Apr 2026 12:02:13 +1000
+Subject: [PATCH xserver 31/31] glx: reject negative size in FeedbackBuffer and
+ SelectBuffer requests
+
+Assisted-by: Claude:claude-claude-opus-4-6
+(cherry picked from commit 54860e6c7f513739adf225a7998004f230db81a0)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2225>
+---
+ glx/single2.c     | 8 ++++++++
+ glx/single2swap.c | 8 ++++++++
+ 2 files changed, 16 insertions(+)
+
+diff --git a/glx/single2.c b/glx/single2.c
+index 36a01f0cb..948d00f1d 100644
+--- a/glx/single2.c
++++ b/glx/single2.c
+@@ -61,6 +61,10 @@ __glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
+     pc += __GLX_SINGLE_HDR_SIZE;
+     size = *(GLsizei *) (pc + 0);
+     type = *(GLenum *) (pc + 4);
++    if (size < 0) {
++        cl->client->errorValue = size;
++        return BadValue;
++    }
+     if (cx->feedbackBufSize < size) {
+         cx->feedbackBuf = reallocarray(cx->feedbackBuf,
+                                        (size_t) size, __GLX_SIZE_FLOAT32);
+@@ -91,6 +95,10 @@ __glXDisp_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
+ 
+     pc += __GLX_SINGLE_HDR_SIZE;
+     size = *(GLsizei *) (pc + 0);
++    if (size < 0) {
++        cl->client->errorValue = size;
++        return BadValue;
++    }
+     if (cx->selectBufSize < size) {
+         cx->selectBuf = reallocarray(cx->selectBuf,
+                                      (size_t) size, __GLX_SIZE_CARD32);
+diff --git a/glx/single2swap.c b/glx/single2swap.c
+index b140946ba..fdc093900 100644
+--- a/glx/single2swap.c
++++ b/glx/single2swap.c
+@@ -62,6 +62,10 @@ __glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc)
+     __GLX_SWAP_INT(pc + 4);
+     size = *(GLsizei *) (pc + 0);
+     type = *(GLenum *) (pc + 4);
++    if (size < 0) {
++        cl->client->errorValue = size;
++        return BadValue;
++    }
+     if (cx->feedbackBufSize < size) {
+         cx->feedbackBuf = reallocarray(cx->feedbackBuf,
+                                        (size_t) size, __GLX_SIZE_FLOAT32);
+@@ -96,6 +100,10 @@ __glXDispSwap_SelectBuffer(__GLXclientState * cl, GLbyte * pc)
+     pc += __GLX_SINGLE_HDR_SIZE;
+     __GLX_SWAP_INT(pc + 0);
+     size = *(GLsizei *) (pc + 0);
++    if (size < 0) {
++        cl->client->errorValue = size;
++        return BadValue;
++    }
+     if (cx->selectBufSize < size) {
+         cx->selectBuf = reallocarray(cx->selectBuf,
+                                      (size_t) size, __GLX_SIZE_CARD32);
+-- 
+2.54.0
+

diff --git a/sources b/sources
index 0e1fedd..469b085 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (xwayland-22.1.9.tar.xz) = 4b30c1cfdb18d9a0f55aa8a8324f625ec5bbd67c1e9041956a2e65c1d063b509cd921ecb8d299f9b6f0daaa01b75ae42f1d47f7fecb944a352cc60954c1ad334
+SHA512 (xwayland-24.1.9.tar.xz) = 7438a572651dc77c1fd749879abccdc9a245c7b75143668d5561a8e99d41063f042a8eb3f9b931a2a12be1fc3cb9d197eee6794d0702a19e56c20f55acb35a26

diff --git a/xorg-x11-server-Xwayland-epel.spec b/xorg-x11-server-Xwayland-epel.spec
index 6125ee6..fc9d45c 100644
--- a/xorg-x11-server-Xwayland-epel.spec
+++ b/xorg-x11-server-Xwayland-epel.spec
@@ -14,8 +14,8 @@
 
 Summary:   Xwayland
 Name:      xorg-x11-server-Xwayland-epel
-Version:   22.1.9
-Release:   2%{?gitdate:.%{gitdate}git%{shortcommit}}%{?dist}
+Version:   24.1.9
+Release:   8%{?gitdate:.%{gitdate}git%{shortcommit}}%{?dist}
 
 URL:       http://www.x.org
 %if 0%{?gitdate}
@@ -24,23 +24,123 @@ Source0:   https://gitlab.freedesktop.org/xorg/%{pkgname}/-/archive/%{commit}/%{
 Source0:   https://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.xz
 %endif
 
+# https://gitlab.freedesktop.org/xorg/xserver/-/work_items/1885
+Patch:     0001-xwayland-Handle-GetCurrentClient-returning-NULL-in-x.patch
+# CVE-2026-33999: XKB Integer Underflow in XkbSetCompatMap()
+Patch:     0001-xkb-fix-buffer-re-use-in-_XkbSetCompatMap.patch
+# CVE-2026-34000: XKB Out-of-bounds Read in CheckSetGeom()
+Patch:     0002-xkb-Fix-bounds-check-in-_CheckSetGeom.patch
+# CVE-2026-34001: XSYNC Use-after-free in miSyncTriggerFence()
+Patch:     0003-miext-sync-Fix-use-after-free-in-miSyncTriggerFence.patch
+# CVE-2026-34002: XKB Out-of-bounds read in CheckModifierMap()
+Patch:     0004-xkb-Fix-out-of-bounds-read-in-CheckModifierMap.patch
+# CVE-2026-34003: XKB Buffer overflow in CheckKeyTypes()
+Patch:     0005-xkb-Add-additional-bound-checking-in-CheckKeyTypes.patch
+Patch:     0006-xkb-Add-more-_XkbCheckRequestBounds.patch
+# ZDI-CAN-30159 - CVE-2026-50257 - XSYNC Use-After-Free in miSyncDestroyFence()
+# ZDI-CAN-30163 - CVE-2026-50260 - XSYNC Use-After-Free in FreeCounter()
+Patch:     0001-sync-fix-deletion-of-counters-and-fences.patch
+# ZDI-CAN-30164 - CVE-2026-50261 - XSYNC Use-After-Free in SyncChangeCounter()
+Patch:     0002-sync-restart-trigger-list-iteration-in-SyncChangeCou.patch
+# ZDI-CAN-30160 - CVE-2026-50258 - XKB Key Types Stack-based Buffer Overflow
+Patch:     0003-xkb-reject-key-types-with-num_levels-exceeding-XkbMa.patch
+# ZDI-CAN-30161 - CVE-2026-50259 - XKB SetMap Request Stack-based Buffer Overflow
+Patch:     0004-xkb-clamp-nMaps-to-mapWidths-buffer-size-in-CheckKey.patch
+# ZDI-CAN-30165 - CVE-2026-50262 - GLX ChangeDrawableAttributes Out-Of-Bounds Read/Write
+Patch:     0005-glx-fix-reversed-length-check-in-ChangeDrawableAttri.patch
+# ZDI-CAN-30168 - CVE-2026-50263 - CreateSaverWindow Use-After-Free Information Disclosure
+Patch:     0006-saver-re-fetch-screen-private-after-CheckScreenPriva.patch
+# ZDI-CAN-30136 - CVE-2026-50256 - Font Alias Stack-based Buffer Overflow
+Patch:     0007-dix-increase-XLFDMAXFONTNAMELEN-to-match-libXfont2-s.patch
+# Other security related fixes
+Patch:     0001-os-use-close-on-exec-for-X-server-socket-to-prevent-.patch
+Patch:     0002-xf86bigfont-fix-Wimplicit-function-declaration-error.patch
+Patch:     0003-dix-Fix-builds-with-meson-Dxace-false-Dwerror-true.patch
+Patch:     0004-meson-don-t-build-xselinux-if-xace-is-disabled.patch
+Patch:     0005-xwayland-fix-builds-with-xace-disabled.patch
+Patch:     0006-panoramix-avoid-null-dereference-in-PanoramiXMaybeAd.patch
+Patch:     0007-panoramix-avoid-null-dereference-in-PanoramiXConsoli.patch
+Patch:     0008-glamor-handle-potential-NULL-return-from-GetPictureS.patch
+Patch:     0009-glamor-handle-allocation-failure-in-glamor_create_pi.patch
+Patch:     0010-glamor-silence-false-positive-in-glamor_validate_gc.patch
+Patch:     0011-glamor-handle-allocation-failures-in-glamor_largepix.patch
+Patch:     0012-glamor-avoid-null-dereference-in-glamor_dash_setup.patch
+Patch:     0013-glamor-avoid-null-dereference-in-glamor_composite_cl.patch
+Patch:     0014-glamor-avoid-double-free-in-glamor_make_pixmap_expor.patch
+Patch:     0015-dix-set-errorValue-correctly-when-XID-lookup-fails-i.patch
+Patch:     0016-os-avoid-closing-null-fd-at-Fopen.patch
+Patch:     0017-os-make-FormatInt64-handle-LONG_MIN-correctly.patch
+Patch:     0018-xwayland-wrong-expecting_event.patch
+Patch:     0019-render-fix-multiple-mem-leaks-on-err-paths.patch
+Patch:     0020-dix-avoid-null-ptr-deref-at-doListFontsAndAliases.patch
+Patch:     0021-randr-clear-primary-screen-s-primaryOutput-when-the-.patch
+Patch:     0022-os-include-assert.h-in-ospoll.c.patch
+Patch:     0023-xkb-fix-incorrect-size-check-when-growing-doodads-in.patch
+Patch:     0024-xkb-fix-potential-buff-overflow-in-XkbVModIndexText-.patch
+Patch:     0025-Xi-add-missing-gesture-grab-type-checks-in-ProcXIPas.patch
+Patch:     0026-xkb-Fix-out-of-bounds-array-access-in-_CheckSetShape.patch
+Patch:     0027-xkb-Fix-off-by-one-in-color-index-validation-in-_Che.patch
+Patch:     0028-xkb-Fix-off-by-one-and-NULL-dereferences-in-_CheckSe.patch
+Patch:     0029-xkb-Add-bounds-check-for-action-data-in-CheckKeyActi.patch
+Patch:     0030-present-actually-return-the-created-notifies.patch
+Patch:     0031-glx-reject-negative-size-in-FeedbackBuffer-and-Selec.patch
+# https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2237
+Patch:     0001-dix-Silence-a-compiler-warning-in-doListFontsAndAlia.patch
+# CVE-2026-56000: GLX contextTags Use-After-Free in CommonMakeCurrent()
+Patch:     0001-glx-free-old-context-tag-before-allocating-new-one-i.patch
+# CVE-2026-55999: glamor Font Atlas Heap Buffer Overflow
+Patch:     0002-fb-mi-glamor-reject-glyphs-with-negative-dimensions.patch
+Patch:     0003-glamor-reject-fonts-with-per-glyph-metrics-exceeding.patch
+# CVE-2026-88812: XKB SetGeometry TextDoodad Double Free
+Patch:     0001-xkb-NULL-text-pointer-after-free-in-_CheckSetDoodad-.patch
+# CVE-2026-93520: XKB ChangeKeycodeRange Heap Out-of-Bounds Write
+Patch:     0002-xkb-allocate-names-keys-to-MAP_LENGTH-in-XkbAllocNam.patch
+# CVE-2026-93518: XKB ResizeKeyType Numeric Truncation
+Patch:     0003-xkb-widen-size_syms-num_syms-size_acts-num_acts-to-u.patch
+# CVE-2026-93524: XKB SetMap Key Width/Action Count Desync Out-Of-Bounds Read
+Patch:     0004-xkb-fix-CheckKeySyms-overwriting-request-range-symsP.patch
+# CVE-2026-93521: RandR ChangeProviderProperty Heap Buffer Overflow
+Patch:     0005-randr-fix-size-and-offset-in-RRChangeProviderPropert.patch
+# CVE-2026-93523: XInput2 PassiveUngrabDevice Modifier Out-of-Bounds Write
+Patch:     0006-Xi-validate-modifier-values-in-ProcXIPassiveUngrabDe.patch
+# CVE-2026-93517: GLX RenderLarge Heap Buffer Overflow
+Patch:     0007-glx-validate-dataBytes-against-cmdlen-in-RenderLarge.patch
+# CVE-2026-93515: Present Extension Cross-Window Notify Use-After-Free
+Patch:     0008-present-unlink-notifies-from-window-list-in-present_.patch
+# CVE-2026-93516: XInput Passive Grab modifierDevice Use-After-Free
+Patch:     0009-dix-remove-passive-grabs-referencing-a-device-on-rem.patch
+# CVE-2026-93519: XFixes Pointer Barrier Event List Buffer Overflow
+Patch:     0010-Xi-add-bounds-check-for-barrier-events-in-input_cons.patch
+# CVE-2026-93536: GestureBuildSprite Use-After-Free
+Patch:     0011-Xi-clean-up-gesture-sprite-traces-in-WindowGone.patch
+# CVE-2026-93522: Glamor CopyArea CPU-FBO Heap Buffer Overflow
+Patch:     0012-glamor-size-tmp_bits-buffer-for-source-coordinate-ra.patch
+# Fix-ups for CVE-2026-93519
+# https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2352
+# https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2353
+Patch:     0001-Xi-avoid-memory-leak-when-hitting-bounds-check-for-b.patch
+Patch:     0002-Xi-fix-event_id-time-delta-in-generated-barrier-even.patch
+
 License:   MIT
 
 Requires: xorg-x11-server-common
 Requires: libEGL
+Requires: libepoxy >= 1.5.5
 
 BuildRequires: gcc
 BuildRequires: git-core
 BuildRequires: meson
 
 BuildRequires: wayland-devel
-BuildRequires: pkgconfig(wayland-client) >= 1.18.0
-BuildRequires: pkgconfig(wayland-protocols)
+BuildRequires: desktop-file-utils
+
+BuildRequires: pkgconfig(wayland-client) >= 1.21.0
+BuildRequires: pkgconfig(wayland-protocols) >= 1.34
 BuildRequires: pkgconfig(wayland-eglstream-protocols)
 
-BuildRequires: pkgconfig(epoxy)
+BuildRequires: pkgconfig(epoxy) >= 1.5.5
 BuildRequires: pkgconfig(fontenc)
-BuildRequires: pkgconfig(libdrm) >= 2.4.0
+BuildRequires: pkgconfig(libdrm) >= 2.4.89
 BuildRequires: pkgconfig(libssl)
 BuildRequires: pkgconfig(libtirpc)
 BuildRequires: pkgconfig(pixman-1)
@@ -63,7 +163,8 @@ BuildRequires: pkgconfig(xtrans) >= 1.3.2
 BuildRequires: pkgconfig(xtst)
 BuildRequires: pkgconfig(xv)
 BuildRequires: pkgconfig(libxcvt)
-BuildRequires: xorg-x11-proto-devel >= 7.7-10
+BuildRequires: pkgconfig(libdecor-0) >= 0.1.1
+BuildRequires: xorg-x11-proto-devel >= 2024.1-1
 
 BuildRequires: mesa-libGL-devel >= 9.2
 BuildRequires: mesa-libEGL-devel
@@ -91,6 +192,7 @@ Xwayland is an X server for running X clients under Wayland.
 %package -n %{pkgname}-devel
 Summary: Development package
 Requires: pkgconfig
+Requires: %{name}%{?_isa} = %{version}-%{release}
 
 %description -n %{pkgname}-devel
 The development package provides the developmental files which are
@@ -105,6 +207,7 @@ necessary for developing Wayland compositors using Xwayland.
         -Ddefault_font_path=%{default_font_path} \
         -Dbuilder_string="Build ID: %{name} %{version}-%{release}" \
         -Dxkb_output_dir=%{_localstatedir}/lib/xkb \
+        -Dserverconfigdir=%{_datadir}/xwayland \
         -Dxcsecurity=true \
         -Dglamor=true \
         -Ddri3=true
@@ -121,6 +224,9 @@ rm -Rf $RPM_BUILD_ROOT%{_includedir}/xorg
 rm -Rf $RPM_BUILD_ROOT%{_datadir}/aclocal
 rm -Rf $RPM_BUILD_ROOT%{_localstatedir}/lib/xkb
 
+%check
+desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
+
 # remove files shipped in RHEL
 rm -Rf $RPM_BUILD_ROOT%{_bindir}
 rm -Rf $RPM_BUILD_ROOT%{_mandir}
@@ -129,9 +235,94 @@ rm -Rf $RPM_BUILD_ROOT%{_mandir}
 %{_libdir}/pkgconfig/xwayland.pc
 
 %changelog
-* Thu Feb 22 2024 Troy Dawson <tdawson@redhat.com> - 22.1.9-2
+* Thu Nov 19 2026 Troy Dawson <tdawson@redhat.com> - 24.1.9-8
 - Convert to xorg-x11-server-Xwayland-epel with just xorg-x11-server-Xwayland-devel subpackage
 
+* Tue Oct 13 2026 Olivier Fourdan <ofourdan@redhat.com> - 24.1.9-8
+- CVE fix for: CVE-2026-88812, CVE-2026-93515, CVE-2026-93516
+               CVE-2026-93517, CVE-2026-93518, CVE-2026-93519,
+               CVE-2026-93520, CVE-2026-93521, CVE-2026-93522,
+               CVE-2026-93523, CVE-2026-93524, CVE-2026-93536
+  Resolves: https://redhat.atlassian.net/browse/RHEL-277891
+  Resolves: https://redhat.atlassian.net/browse/RHEL-277841
+  Resolves: https://redhat.atlassian.net/browse/RHEL-275776
+  Resolves: https://redhat.atlassian.net/browse/RHEL-276866
+  Resolves: https://redhat.atlassian.net/browse/RHEL-276349
+  Resolves: https://redhat.atlassian.net/browse/RHEL-276406
+  Resolves: https://redhat.atlassian.net/browse/RHEL-277899
+  Resolves: https://redhat.atlassian.net/browse/RHEL-277883
+  Resolves: https://redhat.atlassian.net/browse/RHEL-277880
+
+* Wed Jul 08 2026 Olivier Fourdan <ofourdan@redhat.com> - 24.1.9-7
+- CVE fix for: CVE-2026-55999, CVE-2026-56000
+  Resolves: https://redhat.atlassian.net/browse/RHEL-191530
+  Resolves: https://redhat.atlassian.net/browse/RHEL-191519
+
+* Fri Jun 12 2026  Olivier Fourdan <ofourdan@redhat.com> - 24.1.9-6
+- Other security related fixes
+  Resolves: https://redhat.atlassian.net/browse/RHEL-184291
+
+* Wed Jun 10 2026  Olivier Fourdan <ofourdan@redhat.com> - 24.1.9-5
+- CVE fix for: CVE-2026-50256, CVE-2026-50257, CVE-2026-50258,
+               CVE-2026-50259, CVE-2026-50260, CVE-2026-50261,
+               CVE-2026-50262, CVE-2026-50263
+  Resolves: https://redhat.atlassian.net/browse/RHEL-182448
+
+* Wed Apr 22 2026 Olivier Fourdan <ofourdan@redhat.com> - 24.1.9-4
+- CVE fix for: CVE-2026-33999, CVE-2026-34000, CVE-2026-34001
+               CVE-2026-34002, CVE-2026-34003
+  Resolves: https://redhat.atlassian.net/browse/RHEL-163200
+  Resolves: https://redhat.atlassian.net/browse/RHEL-163296
+  Resolves: https://redhat.atlassian.net/browse/RHEL-163254
+
+* Tue Apr 21 2026 Olivier Fourdan <ofourdan@redhat.com> - 24.1.9-3
+- Fix a regression in Xwayland 24.1.9 with XTS test Xlib10
+  Resolves: https://redhat.atlassian.net/browse/RHEL-169765
+
+* Tue Jan 13 2026 Michel Dänzer  <mdaenzer@redhat.com> - 24.1.9-2
+- Rebuild against xorg-x11-xtrans-devel 1.4.0-9
+  Resolves: RHEL-117510
+
+* Thu Nov 20 2025 Olivier Fourdan <ofourdan@redhat.com> - 24.1.9-1
+- Rebase to Xwayland 24.1.9 (RHEL-129828)
+
+* Thu Oct 30 2025 Olivier Fourdan <ofourdan@redhat.com> - 23.2.7-5
+- CVE fix for: CVE-2025-62229 (RHEL-119977), CVE-2025-62230 (RHEL-120023),
+               CVE-2025-62231 (RHEL-125018)
+
+* Wed Jun 18 2025 Olivier Fourdan <ofourdan@redhat.com> - 23.2.7-4
+- CVE fix for: CVE-2025-49175 (RHEL-97288), CVE-2025-49176 (RHEL-97334),
+               CVE-2025-49177 (RHEL-97357), CVE-2025-49178 (RHEL-97393),
+               CVE-2025-49179 (RHEL-97404), CVE-2025-49180 (RHEL-97244)
+
+* Wed Feb 26 2025 Olivier Fourdan <ofourdan@redhat.com> - 23.2.7-3
+- CVE fix for: CVE-2025-26594 (RHEL-80204), CVE-2025-26595 (RHEL-80187),
+               CVE-2025-26596 (RHEL-80190), CVE-2025-26597 (RHEL-80193),
+               CVE-2025-26598 (RHEL-80195), CVE-2025-26599 (RHEL-80202),
+               CVE-2025-26600 (RHEL-80203), CVE-2025-26601 (RHEL-80207)
+
+* Wed Oct 30 2024 Olivier Fourdan <ofourdan@redhat.com> - 23.2.7-2
+- Fix for CVE-2024-9632 - (RHEL-61997)
+
+* Thu May 16 2024 Olivier Fourdan <ofourdan@redhat.com> - 23.2.7-1
+- xwayland 23.2.7 - (RHEL-29912)
+
+* Thu Apr  4 2024 Olivier Fourdan <ofourdan@redhat.com> - 21.1.9-7
+- CVE fix for: CVE-2024-31080, CVE-2024-31081, CVE-2024-31083
+
+* Wed Mar 13 2024 Olivier Fourdan <ofourdan@redhat.com> - 21.1.9-6
+  New build to add xorg-x11-server-Xwayland-devel (RHEL-25083)
+
+* Tue Jan 16 2024 Olivier Fourdan <ofourdan@redhat.com> - 21.1.9-5
+  Fix for CVE-2023-6816, CVE-2024-0229, CVE-2024-21885, CVE-2024-21886,
+  CVE-2024-0408, CVE-2024-0409
+
+* Wed Dec 13 2023 Olivier Fourdan <ofourdan@redhat.com> - 21.1.9-4
+- Fix for CVE-2023-6377, CVE-2023-6478
+
+* Wed Oct 25 2023 Olivier Fourdan <ofourdan@redhat.com> - 22.1.9-3
+- Fix for CVE-2023-5367
+
 * Tue Apr 25 2023 Olivier Fourdan <ofourdan@redhat.com> - 22.1.9-2
 - Rebuild (#2158761)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-19 15:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-19 15:33 [rpms/xorg-x11-server-Xwayland-epel] epel9: Update to 24.1.9 Troy Dawson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox