Bug 2545860 (CVE-2026-93518) - CVE-2026-93518 xorg-x11-server: xorg-x11-server: arbitrary code execution via integer truncation during keyboard mapping resize
Summary: CVE-2026-93518 xorg-x11-server: xorg-x11-server: arbitrary code execution via...
Keywords:
Status: NEW
Alias: CVE-2026-93518
Deadline: 2026-10-07
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-10-05 10:06 UTC by OSIDB Bzimport
Modified: 2026-11-19 23:28 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2026:100477 0 None None None 2026-11-19 18:44:39 UTC
Red Hat Product Errata RHSA-2026:100492 0 None None None 2026-11-19 18:39:45 UTC
Red Hat Product Errata RHSA-2026:100499 0 None None None 2026-11-19 18:39:07 UTC
Red Hat Product Errata RHSA-2026:100648 0 None None None 2026-11-19 23:27:41 UTC
Red Hat Product Errata RHSA-2026:100651 0 None None None 2026-11-19 23:28:35 UTC
Red Hat Product Errata RHSA-2026:84574 0 None None None 2026-10-19 04:00:03 UTC
Red Hat Product Errata RHSA-2026:85191 0 None None None 2026-10-19 14:14:33 UTC
Red Hat Product Errata RHSA-2026:85193 0 None None None 2026-10-19 14:40:45 UTC
Red Hat Product Errata RHSA-2026:86907 0 None None None 2026-10-21 12:24:54 UTC
Red Hat Product Errata RHSA-2026:89747 0 None None None 2026-10-26 03:54:02 UTC
Red Hat Product Errata RHSA-2026:98476 0 None None None 2026-11-11 11:58:58 UTC
Red Hat Product Errata RHSA-2026:98487 0 None None None 2026-11-11 12:01:49 UTC
Red Hat Product Errata RHSA-2026:98538 0 None None None 2026-11-11 12:14:01 UTC
Red Hat Product Errata RHSA-2026:98546 0 None None None 2026-11-11 09:07:25 UTC
Red Hat Product Errata RHSA-2026:98547 0 None None None 2026-11-11 09:17:04 UTC
Red Hat Product Errata RHSA-2026:98548 0 None None None 2026-11-11 09:29:18 UTC
Red Hat Product Errata RHSA-2026:98549 0 None None None 2026-11-11 09:14:35 UTC
Red Hat Product Errata RHSA-2026:98581 0 None None None 2026-11-11 11:24:01 UTC
Red Hat Product Errata RHSA-2026:98658 0 None None None 2026-11-11 10:07:44 UTC
Red Hat Product Errata RHSA-2026:98659 0 None None None 2026-11-11 10:00:47 UTC
Red Hat Product Errata RHSA-2026:98660 0 None None None 2026-11-11 10:13:44 UTC
Red Hat Product Errata RHSA-2026:98951 0 None None None 2026-11-11 13:47:15 UTC
Red Hat Product Errata RHSA-2026:99515 0 None None None 2026-11-12 06:33:05 UTC
Red Hat Product Errata RHSA-2026:99623 0 None None None 2026-11-12 13:30:28 UTC

Description OSIDB Bzimport 2026-10-05 10:06:20 UTC
In XkbResizeKeyType(), the size_syms variable is declared as unsigned
     short. The expression (nTotal * 15) / 10 can exceed 65535 for large
     nTotal values, and the result is truncated when assigned to the
     unsigned short variable. This causes an undersized allocation, and
     subsequent writes overflow the heap buffer.

     An authenticated X client can trigger this by sending XKB requests that
     cause a key type resize with a sufficiently large nTotal value.

     The heap buffer overflow resulting from the truncated allocation can lead
     to arbitrary code execution or denial of service.

     Fixed in: xorg-server-21.1.25 and xwayland-24.1.14

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.

---
 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 749f1f26e500..45a15f37632a 100644
--- a/include/xkbstr.h
+++ b/include/xkbstr.h
@@ -307,18 +307,18 @@ typedef struct _XkbControls {
 } XkbControlsRec, *XkbControlsPtr;
 
 #define	XkbAX_AnyFeedback(c)	((c)->enabled_ctrls&XkbAccessXFeedbackMask)
 #define	XkbAX_NeedOption(c,w)	((c)->ax_options&(w))
 #define	XkbAX_NeedFeedback(c, w) (XkbAX_AnyFeedback((c)) && \
                                   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;
     unsigned short *key_acts;
 #if defined(__cplusplus) || defined(c_plusplus)
     /* explicit is a C++ reserved word */
     unsigned char *c_explicit;
 #else
@@ -341,18 +341,18 @@ typedef struct _XkbSymMapRec {
     unsigned short offset;
 } XkbSymMapRec, *XkbSymMapPtr;
 
 typedef struct _XkbClientMapRec {
     unsigned char size_types;
     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;
 
     unsigned char *modmap;
 } XkbClientMapRec, *XkbClientMapPtr;
 
 #define	XkbCMKeyGroupInfo(m, k) ((m)->key_sym_map[(k)].group_info)
 #define	XkbCMKeyNumGroups(m, k) (XkbNumGroups((m)->key_sym_map[(k)].group_info))
diff --git a/xkb/XKBMAlloc.c b/xkb/XKBMAlloc.c
index 78e597f3d93e..8f8ac28fadb9 100644
--- a/xkb/XKBMAlloc.c
+++ b/xkb/XKBMAlloc.c
@@ -380,17 +380,18 @@ XkbResizeKeyType(XkbDescPtr xkb,
                 nTotal += XkbKeyNumSyms(xkb, i);
             else {
                 nTotal += XkbKeyNumGroups(xkb, i) * new_num_lvls;
                 nResize++;
             }
         }
         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)
                 return BadAlloc;
             nextMatch = 0;
             nSyms = 1;
             for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) {
                 if (matchingKeys[nextMatch] == i) {
-- 
2.55.0

Comment 1 Jon Orris 2026-10-19 04:00:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:84574 https://access.redhat.com/errata/RHSA-2026:84574

Comment 2 Jon Orris 2026-10-19 14:14:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:85191 https://access.redhat.com/errata/RHSA-2026:85191

Comment 3 Jon Orris 2026-10-19 14:40:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:85193 https://access.redhat.com/errata/RHSA-2026:85193

Comment 4 Jon Orris 2026-10-21 12:24:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:86907 https://access.redhat.com/errata/RHSA-2026:86907

Comment 5 Jon Orris 2026-10-26 03:54:01 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:89747 https://access.redhat.com/errata/RHSA-2026:89747

Comment 6 errata-xmlrpc 2026-11-11 09:07:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10.0 Extended Update Support

Via RHSA-2026:98546 https://access.redhat.com/errata/RHSA-2026:98546

Comment 7 errata-xmlrpc 2026-11-11 09:14:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:98549 https://access.redhat.com/errata/RHSA-2026:98549

Comment 8 errata-xmlrpc 2026-11-11 09:17:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions

Via RHSA-2026:98547 https://access.redhat.com/errata/RHSA-2026:98547

Comment 9 errata-xmlrpc 2026-11-11 09:29:17 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.6 Extended Update Support

Via RHSA-2026:98548 https://access.redhat.com/errata/RHSA-2026:98548

Comment 10 errata-xmlrpc 2026-11-11 10:00:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:98659 https://access.redhat.com/errata/RHSA-2026:98659

Comment 11 errata-xmlrpc 2026-11-11 10:07:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions

Via RHSA-2026:98658 https://access.redhat.com/errata/RHSA-2026:98658

Comment 12 errata-xmlrpc 2026-11-11 10:13:42 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.6 Extended Update Support

Via RHSA-2026:98660 https://access.redhat.com/errata/RHSA-2026:98660

Comment 13 errata-xmlrpc 2026-11-11 11:24:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:98581 https://access.redhat.com/errata/RHSA-2026:98581

Comment 14 errata-xmlrpc 2026-11-11 11:58:57 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:98476 https://access.redhat.com/errata/RHSA-2026:98476

Comment 15 errata-xmlrpc 2026-11-11 12:01:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:98487 https://access.redhat.com/errata/RHSA-2026:98487

Comment 16 errata-xmlrpc 2026-11-11 12:14:00 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:98538 https://access.redhat.com/errata/RHSA-2026:98538

Comment 17 errata-xmlrpc 2026-11-11 13:47:14 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On

Via RHSA-2026:98951 https://access.redhat.com/errata/RHSA-2026:98951

Comment 18 errata-xmlrpc 2026-11-12 06:33:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.8 Telecommunications Update Service

Via RHSA-2026:99515 https://access.redhat.com/errata/RHSA-2026:99515

Comment 19 errata-xmlrpc 2026-11-12 13:30:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:99623 https://access.redhat.com/errata/RHSA-2026:99623

Comment 20 errata-xmlrpc 2026-11-19 18:39:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.8 Telecommunications Update Service

Via RHSA-2026:100499 https://access.redhat.com/errata/RHSA-2026:100499

Comment 21 errata-xmlrpc 2026-11-19 18:39:44 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7 Extended Lifecycle Support

Via RHSA-2026:100492 https://access.redhat.com/errata/RHSA-2026:100492

Comment 22 errata-xmlrpc 2026-11-19 18:44:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.8 Extended Update Support

Via RHSA-2026:100477 https://access.redhat.com/errata/RHSA-2026:100477

Comment 23 errata-xmlrpc 2026-11-19 23:27:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On

Via RHSA-2026:100648 https://access.redhat.com/errata/RHSA-2026:100648

Comment 24 errata-xmlrpc 2026-11-19 23:28:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On

Via RHSA-2026:100651 https://access.redhat.com/errata/RHSA-2026:100651


Note You need to log in before you can comment on or make changes to this bug.