public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Peter Hutterer <peter.hutterer@who-t.net>
To: git-commits@fedoraproject.org
Subject: [rpms/libX11] f45: xkb: Check the keysym range in _XkbReadKeyActions (CVE-2026-88806)
Date: Wed, 30 Sep 2026 08:12:29 GMT	[thread overview]
Message-ID: <179075594918.1.7162025664545254284.rpms-libX11-bcfb1f667006@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/libX11
Branch : f45
Commit : bcfb1f667006437e073677ede305a08ac543a6ec
Author : Peter Hutterer <peter.hutterer@who-t.net>
Date   : 2026-09-30T16:21:15+10:00
Stats  : +58/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libX11/c/bcfb1f667006437e073677ede305a08ac543a6ec?branch=f45

Log:
xkb: Check the keysym range in _XkbReadKeyActions (CVE-2026-88806)

---
diff --git a/0001-xkb-Check-the-keysym-range-in-_XkbReadKeyActions-CVE.patch b/0001-xkb-Check-the-keysym-range-in-_XkbReadKeyActions-CVE.patch
new file mode 100644
index 0000000..2ab9573
--- /dev/null
+++ b/0001-xkb-Check-the-keysym-range-in-_XkbReadKeyActions-CVE.patch
@@ -0,0 +1,53 @@
+From 6d4432b13c0b3b6a644c13de9c793a14db48d545 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Wed, 16 Sep 2026 15:27:33 +1000
+Subject: [PATCH libX11] xkb: Check the keysym range in _XkbReadKeyActions
+ (CVE-2026-88806)
+
+A malicious server could send a XkbGetMap reply with
+firstKeyAct + nKeyActs exceeding max_keycode=+ 1. This would
+cause an OOB write into info->map->key_sym_map[rep->firstKeyAct + i].
+
+This brings this function in line with the other functions in this file
+which already have checks in place.
+
+This vulnerability was discovered by:
+Adam Bedard working with TrendAI Zero Day Initiative
+
+ZDI-CAN-32061
+
+CVE-2026-88806
+
+Assisted-by: Claude:claude-opus-4-6
+Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/309>
+---
+ src/xkb/XKBGetMap.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/xkb/XKBGetMap.c b/src/xkb/XKBGetMap.c
+index 31199e4a28e8..eaa0d6d5d024 100644
+--- a/src/xkb/XKBGetMap.c
++++ b/src/xkb/XKBGetMap.c
+@@ -248,16 +248,19 @@ _XkbReadKeyActions(XkbReadBufferPtr buf, XkbDescPtr info, xkbGetMapReply *rep)
+     CARD8 numDescBuf[248];
+     CARD8 *numDesc = NULL;
+     register int nKeyActs;
+     Status ret = Success;
+ 
+     if ((nKeyActs = rep->nKeyActs) > 0) {
+         XkbSymMapPtr symMap;
+ 
++        if (((int) rep->firstKeyAct + rep->nKeyActs) > (info->max_key_code + 1))
++            return BadLength;
++
+         if (nKeyActs < sizeof numDescBuf)
+             numDesc = numDescBuf;
+         else
+             numDesc = Xmallocarray(nKeyActs, sizeof(CARD8));
+ 
+         if (!_XkbCopyFromReadBuffer(buf, (char *) numDesc, nKeyActs)) {
+             ret = BadLength;
+             goto done;
+-- 
+2.55.0
+

diff --git a/libX11.spec b/libX11.spec
index b08778f..7c9ea7c 100644
--- a/libX11.spec
+++ b/libX11.spec
@@ -5,7 +5,7 @@
 Summary: Core X11 protocol client library
 Name: libX11
 Version: 1.8.13
-Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
+Release: 3%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
 License: MIT AND X11
 URL: http://www.x.org
 
@@ -19,6 +19,7 @@ Source0: https://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.
 
 
 Patch2: dont-forward-keycode-0.patch
+Patch0001: 0001-xkb-Check-the-keysym-range-in-_XkbReadKeyActions-CVE.patch
 
 BuildRequires: libtool
 BuildRequires: make
@@ -123,6 +124,9 @@ make %{?_smp_mflags} check
 %{_mandir}/man5/*.5*
 
 %changelog
+* Wed Sep 30 2026 Peter Hutterer <peter.hutterer@redhat.com> - 1.8.13-3
+- xkb: Check the keysym range in _XkbReadKeyActions (CVE-2026-88806)
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.13-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

                 reply	other threads:[~2026-09-30  8:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179075594918.1.7162025664545254284.rpms-libX11-bcfb1f667006@fedoraproject.org \
    --to=peter.hutterer@who-t.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox