======================================================================= X.Org Security Advisory: July 08, 2026
Issues in X.Org X server prior to xorg-server-21.1.24 and Xwayland prior to xwayland-24.1.13 =======================================================================
Multiple issues have been found in the X server and Xwayland implementations published by X.Org for which we are releasing security fixes for in xorg-server-21.1.24 and xwayland-24.1.13.
CVE-2026-55999: glamor Font Atlas Heap Buffer Overflow
glamorfontget() builds a per-font texture atlas by laying out every glyph in the font into a single backing buffer. It computes the slot dimensions from the font's declared maxbounds, but copies each per-glyph bitmap using the individual glyph's metrics (GLYPHHEIGHTPIXELS / GLYPHWIDTHBYTES macros). There is no check that maxbounds actually bounds the per-glyph values.
When the font is loaded from a malicious PCF file whose per-glyph metrics exceed the file's maxbounds, the per-glyph memcpy writes far beyond the heap-allocated slot, producing a heap buffer overflow with attacker-controlled extent and attacker-controlled content.
An authenticated X client can trigger this by using SetFontPath to add a directory containing a crafted PCF font, loading the font with OpenFont, and drawing text on a glamor-backed drawable. Only servers using the glamor acceleration backend (Xorg with modesetting driver, Xwayland) are affected.
Fixed in: xorg-server-21.1.24 and xwayland-24.1.13 Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/fbf7bac22e2c6bd627fb042742a23318263edae1 Found by: Anonymous working with Trend Micro Zero Day Initiative. (ZDI-CAN-30498)
CVE-2026-56000: GLX contextTags Use-After-Free in CommonMakeCurrent()
IMPORTANT: This issue was reported against 21.1.16 but we've been unable to reproduce it on that release. It is present on the main and the discontinued master branch and in Xwayland. Distributions that backported upstream commit 4781f2a5a8c2c2b000374e2d87982a6701d5a6b3 to 21.1.x are definitely affected.
CommonMakeCurrent() in the GLX dispatch layer captures a pointer into the per-client cl->contextTags array by calling GlxLookupContextTag(). This returns a direct pointer into an array later realloced. If realloc() moves the buffer to a new location, the previously captured oldTag pointer becomes dangling.
The subsequent GlxFreeContextTag(oldTag) then writes zeros into freed heap memory (use-after-free). Five fields are zeroed at fixed offsets (16, 24, 32, 36, 40 bytes) within the stale slot.
A malicious client can force the realloc by creating 16 GLX contexts with MakeCurrent(oldContextTag=0) to fill all tag slots to capacity, then issuing a 17th MakeCurrent with a non-zero oldContextTag. This triggers the realloc while oldTag points into the old buffer. The attack requires only 34 X11 requests (17 CreateContext + 17 MakeCurrent) from a single client.
Fixed in: xorg-server-21.1.24 and xwayland-24.1.13 Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/2779affbdb4354e894f490e56f962527d6125043 Found by: Anonymous working with Trend Micro Zero Day Initiative. (ZDI-CAN-30561)
CommonMakeCurrent() in the GLX dispatch layer captures a pointer into the per-client cl->contextTags array by calling GlxLookupContextTag(). This returns a direct pointer into an array later realloced. If realloc() moves the buffer to a new location, the previously captured oldTag pointer becomes dangling. The subsequent GlxFreeContextTag(oldTag) then writes zeros into freed heap memory (use-after-free). Five fields are zeroed at fixed offsets (16, 24, 32, 36, 40 bytes) within the stale slot. A malicious client can force the realloc by creating 16 GLX contexts with MakeCurrent(oldContextTag=0) to fill all tag slots to capacity, then issuing a 17th MakeCurrent with a non-zero oldContextTag. This triggers the realloc while oldTag points into the old buffer. The attack requires only 34 X11 requests (17 CreateContext + 17 MakeCurrent) from a single client.
glamorfontget() builds a per-font texture atlas by laying out every glyph in the font into a single backing buffer. It computes the slot dimensions from the font's declared maxbounds, but copies each per-glyph bitmap using the individual glyph's metrics (GLYPHHEIGHTPIXELS/GLYPHWIDTHBYTES macros). There is no check that maxbounds actually bounds the per-glyph values.
When the font is loaded from a malicious PCF file whose per-glyph metrics exceed the file's maxbounds, the per-glyph memcpy writes far beyond the heap-allocated slot, producing a heap buffer overflow with attacker-controlled extent and attacker-controlled content.
An authenticated X client can trigger this by using SetFontPath to add a directory containing a crafted PCF font, loading the font with OpenFont, and drawing text on a glamor-backed drawable. Only servers using the glamor acceleration backend (Xorg with modesetting driver, Xwayland) are affected.
A client can trigger a use-after-free read after changing window attributes and forcing the screen saver in CreateSaverWindow(), leading to information disclosure.
Any X client that can connect to the server can trigger this issue.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/ecc634f1b2f7aa473d3a267eada98c4918bf9e05
Reported via ZDI-CAN-30168 (Trend Micro Zero Day Initiative). Tracking: PSIRTSUPT-16950.
A wrong size validation check in glXDispChangeDrawableAttributes() can read (or write) a client-controlled number of bytes, exceeding the request buffer. The write path requires byte-swapped clients which is disabled by default. The read can lead to information disclosure; the write can crash the server or enable privilege escalation if the X server runs as root.
Any X client that can connect to the server can trigger this issue.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/6d459e4daf715bea8abdafa8fb130be2f8a1d145
Reported via ZDI-CAN-30165 (Trend Micro Zero Day Initiative). Tracking: PSIRTSUPT-16950.
A client that requests multiple DRI2BufferBackLeft attachments and one DRI2BufferFrontLeft can trigger an out-of-bounds heap write in DRIGetBuffers/DRIGetBuffersWithFormat.
Any local X client that can connect to the server can trigger this issue. This may be used to crash the server, or for privilege escalation if the X server runs as root.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/339c279514326134b0878fc23ce6e9520440ce7f
Identified by Peter Hutterer, Red Hat. Tracking: PSIRTSUPT-16950.
A client that sets up multiple SyncCounters can trigger a use-after-free when destroying those counters via a second client connection while changing those counters in SyncChangeCounter().
Any X client that can connect to the server can trigger this issue. This may be used to crash the server, or for privilege escalation if the X server runs as root.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/bdd7bf57af208b1ddf57d4683d67104443b44812
Reported via ZDI-CAN-30164 (Trend Micro Zero Day Initiative). Tracking: PSIRTSUPT-16950.
XkbSetMapChecks() declares a fixed-size stack buffer mapWidths[256] indexed by key type index. The helper function CheckKeyTypes() writes to this buffer at a client-controlled offset, allowing a stack buffer overflow.
Any X client that can connect to the server can trigger this issue. This may be used to crash the server, or for privilege escalation if the X server runs as root.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/867b59b33bee669cb412f1314e47c52eacf6e00b
Reported via ZDI-CAN-30161 (Trend Micro Zero Day Initiative). Tracking: PSIRTSUPT-16950.
A client that sets up multiple fence triggers can trigger a use-after-free function pointer call in miSyncDestroyFence(). An attacker connects to the X server to set up a fence and awaits that fence, then a second X connection destroys the fence, causing the use-after-free.
Any X client that can connect to the server can trigger this issue. This may be used to crash the server, or for privilege escalation if the X server runs as root.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/f5abfb61994471023d8c6470428c8e30c411cc0b
Reported via ZDI-CAN-30159 (Trend Micro Zero Day Initiative). Tracking: PSIRTSUPT-16950.
A client that sets up multiple SyncCounters and awaits on those triggers can trigger a use-after-free when destroying those counters via a second client connection in FreeCounter().
Any X client that can connect to the server can trigger this issue. This may be used to crash the server, or for privilege escalation if the X server runs as root.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/f5abfb61994471023d8c6470428c8e30c411cc0b
Reported via ZDI-CAN-30163 (Trend Micro Zero Day Initiative). Tracking: PSIRTSUPT-16950.
A stack-based buffer overflow flaw was found in the X.Org X server and Xwayland. The X server has multiple stack buffers sized XkbMaxShiftLevel XkbNumKbdGroups but CheckKeyTypes() does not verify or clamp non-canonical key types to XkbMaxShiftLevel. A client can change key types to excessive shift levels and trigger stack overflows. This is caused by an incomplete fix of CVE-2025-26597. This may be used to crash the server, or for privilege escalation if the X server runs as root.
A mismatch between the X server and the libXfont2 library's maximum font name length can cause a stack buffer overflow during font alias resolution. The server allocates a 256 byte stack buffer but libXfont2's alias target name length is 1024 bytes. A font alias name between 257 and 1023 bytes causes the X server to copy that name into the undersized stack buffer without further checks.
Any X client that can connect to the server can trigger this issue. This may be used to crash the server, or for privilege escalation if the X server runs as root.
Components affected: xorg-x11-server, xorg-x11-server-Xwayland Versions affected: xorg-x11-server <= 21.1.22, xorg-x11-server-Xwayland <= 24.1.9
Fixed upstream in xorg-server-21.1.23 and xwayland-24.1.12. Fix: https://gitlab.freedesktop.org/xorg/xserver/-/commit/bb5158f962dc935e58ef8b4b5fcb31be201a6e07
Reported via ZDI-CAN-30136 (Trend Micro Zero Day Initiative). Tracking: PSIRTSUPT-16950.
A flaw was found in the X.Org X server. This vulnerability, an out-of-bounds read, affects the XKB (X Keyboard Extension) modifier map handling. An attacker with access to the X11 server can exploit this by sending a malformed request, which causes the server to read beyond its intended memory boundaries. This can lead to the exposure of sensitive information or cause the server to crash, resulting in a denial of service.
A flaw was found in the X.Org X server. This out-of-bounds read vulnerability in the XKB geometry processing, specifically within the CheckSetGeom() and XkbAddGeomKeyAlias functions, allows an attacker to read uninitialized or out-of-bounds memory. An attacker with a connection to the X11 server, either locally or remotely, can exploit this without user interaction. This could lead to the disclosure of memory contents or cause a denial of service by crashing the server.
A flaw was identified in the X.Org X server’s X Keyboard (Xkb) extension where improper bounds checking in the XkbSetCompatMap() function can cause an unsigned short overflow. If an attacker sends specially crafted input data, the value calculation may overflow, leading to memory corruption or a crash.
Integer overflow vulnerability in the XkbSetCompatMap() function of the X.Org X server and Xwayland. The XkbCompatMap structure uses unsigned short values for some fields but fails to verify that input sums do not exceed the valid range. Crafted XkbSetCompatMap requests can trigger arithmetic overflow, potentially corrupting memory and causing the X server to crash.
A flaw was discovered in the X.Org X server’s X Keyboard (Xkb) extension when handling client resource cleanup. The software frees certain data structures without properly detaching related resources, leading to a use-after-free condition. This can cause memory corruption or a crash when affected clients disconnect.
Use-after-free vulnerability in the Xkb client resource removal logic of the X.Org X server and Xwayland. When removing a client’s Xkb resources, the XkbInterest data is freed prematurely while the associated resource reference remains active. When the client terminates, the cleanup routine attempts to delete already freed memory, causing a use-after-free that may lead to crashes or memory corruption.
Use-after-free vulnerability in the X11 Present extension implementation of the X.Org X server and Xwayland. The flaw occurs when processing notifications after presenting a pixmap; if an error happens, a dangling pointer remains in the error path. This leads to a use-after-free when destroying notification structures later. A remote attacker can exploit this via crafted X11 requests to trigger memory corruption or denial of service. The issue has existed since Xorg 1.15.
A flaw was found in the X server's request handling. Non-zero 'bytes to ignore' in a client's request can cause the server to skip processing another client's request, potentially leading to a denial of service.
A heap overflow flaw was found in X.Org and Xwayland. The computation of the length in XkbSizeKeySyms() differs from what is written in XkbWriteKeySyms(), which may lead to a heap-based buffer overflow.
A buffer overflow flaw was found in X.Org and Xwayland. If XkbChangeTypesOfKey() is called with a 0 group, it will resize the key symbols table to 0 but leave the key actions unchanged. If the same function is later called with a non-zero value of groups, this will cause a buffer overflow because the key actions are of the wrong size.
A buffer overflow flaw was found in X.Org and Xwayland. The code in XkbVModMaskText() allocates a fixed-sized buffer on the stack and copies the names of the virtual modifiers to that buffer. The code fails to check the bounds of the buffer and would copy the data regardless of the size.
A use-after-free flaw was found in X.Org and Xwayland. When a device is removed while still frozen, the events queued for that device remain while the device is freed. Replaying the events will cause a use-after-free.
An access to an uninitialized pointer flaw was found in X.Org and Xwayland. The function compCheckRedirect() may fail if it cannot allocate the backing pixmap. In that case, compRedirectWindow() will return a BadAlloc error without validating the window tree marked just before, which leaves the validated data partly initialized and the use of an uninitialized pointer later.
An out-of-bounds write flaw was found in X.Org and Xwayland. The function GetBarrierDevice() searches for the pointer device based on its device ID and returns the matching value, or supposedly NULL, if no match was found. However, the code will return the last element of the list if no matching device ID is found, which can lead to out-of-bounds memory access.
A use-after-free flaw was found in X.Org and Xwayland. When changing an alarm, the values of the change mask are evaluated one after the other, changing the trigger values as requested, and eventually, SyncInitTrigger() is called. If one of the changes triggers an error, the function will return early, not adding the new sync object, possibly causing a use-after-free when the alarm eventually triggers.
A use-after-free flaw was found in X.Org and Xwayland. The root cursor is referenced in the X server as a global variable. If a client frees the root cursor, the internal reference points to freed memory and causes a use-after-free.
A flaw was found in X.Org server. Both DeviceFocusEvent and the XIQueryPointer reply contain a bit for each logical button currently down. Buttons can be arbitrarily mapped to any value up to 255, but the X.Org Server was only allocating space for the device's particular number of buttons, leading to a heap overflow if a bigger value was used.
A flaw was found in the X.Org server. The cursor code in both Xephyr and Xwayland uses the wrong type of private at creation. It uses the cursor bits type with the cursor as private, and when initiating the cursor, that overwrites the XSELINUX context.