diff mbox series

[meta-oe,scarthgap,RFC,09/14] tigervnc: patch CVE-2025-26596

Message ID 20260127130116.1902238-10-skandigraun@gmail.com
State New
Headers show
Series TigerVNC CVEs | expand

Commit Message

Gyorgy Sarvari Jan. 27, 2026, 1:01 p.m. UTC
Details: https://nvd.nist.gov/vuln/detail/CVE-2025-26596

Pick the patch that mentions the CVE ID explicitly in its commit message.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 .../tigervnc/files/CVE-2025-26596.patch       | 51 +++++++++++++++++++
 .../tigervnc/tigervnc_1.11.0.bb               |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/CVE-2025-26596.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/tigervnc/files/CVE-2025-26596.patch b/meta-oe/recipes-graphics/tigervnc/files/CVE-2025-26596.patch
new file mode 100644
index 0000000000..af7be3c664
--- /dev/null
+++ b/meta-oe/recipes-graphics/tigervnc/files/CVE-2025-26596.patch
@@ -0,0 +1,51 @@ 
+From 2bc545d09abfe1e91cc15990232649ab8ce5c8b3 Mon Sep 17 00:00:00 2001
+From: Gyorgy Sarvari <skandigraun@gmail.com>
+Date: Thu, 28 Nov 2024 11:49:34 +0100
+Subject: [PATCH] xkb: Fix computation of XkbSizeKeySyms
+
+From: Olivier Fourdan <ofourdan@redhat.com>
+
+The computation of the length in XkbSizeKeySyms() differs from what is
+actually written in XkbWriteKeySyms(), leading to a heap overflow.
+
+Fix the calculation in XkbSizeKeySyms() to match what kbWriteKeySyms()
+does.
+
+CVE-2025-26596, ZDI-CAN-25543
+
+This vulnerability was discovered by:
+Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+(cherry picked from commit 80d69f01423fc065c950e1ff4e8ddf9f675df773)
+
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1830>
+(cherry picked from commit b4293650b50efe7832cf9eac71217ad8d6341e02)
+
+CVE: CVE-2025-26596
+Upstream-Status: Backport [https://gitlab.freedesktop.org/xorg/xserver/-/commit/b4293650b50efe7832cf9eac71217ad8d6341e02]
+Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
+---
+ xkb/xkb.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 68c59df02..175a81bf7 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -1093,10 +1093,10 @@ XkbSizeKeySyms(XkbDescPtr xkb, xkbGetMapReply * rep)
+     len = rep->nKeySyms * SIZEOF(xkbSymMapWireDesc);
+     symMap = &xkb->map->key_sym_map[rep->firstKeySym];
+     for (i = nSyms = 0; i < rep->nKeySyms; i++, symMap++) {
+-        if (symMap->offset != 0) {
+-            nSymsThisKey = XkbNumGroups(symMap->group_info) * symMap->width;
+-            nSyms += nSymsThisKey;
+-        }
++        nSymsThisKey = XkbNumGroups(symMap->group_info) * symMap->width;
++        if (nSymsThisKey == 0)
++            continue;
++        nSyms += nSymsThisKey;
+     }
+     len += nSyms * 4;
+     rep->totalSyms = nSyms;
diff --git a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb
index 1b6b965fc7..e97f82f6e7 100644
--- a/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb
+++ b/meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb
@@ -28,6 +28,7 @@  SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.11-branch;protocol=ht
            file://CVE-2025-26594-1.patch;patchdir=${XORG_S} \
            file://CVE-2025-26594-2.patch;patchdir=${XORG_S} \
            file://CVE-2025-26595.patch;patchdir=${XORG_S} \
+           file://CVE-2025-26596.patch;patchdir=${XORG_S} \
 "
 
 # Keep sync with xorg-server in oe-core