Skip to contentSkip to conversation

TigerVNC CVEs - alternative version

PATCH New Gyorgy Sarvari 1 participant 6 messages Feb 1

lore
Share & tools
lore
#0 lore raw

cover TigerVNC CVEs - alternative version

This is an alernative fix for a previous series[1] fixing the outstanding CVEs for TigerVNC. This series brings the xserver component in sync with oe-core, now they use the same version.

xserver 21 support however was only added to TigerVNC two versions later, in verison 1.13. The first commit contains patches to support this verison of xserver. I was able to compile and connect to a VNC session successfully from core-image-sato using these patches.

The rest of the cherry-picks just ignore the CVEs that are fixed in this version of xserver.

[1]: https://lists.openembedded.org/g/openembedded-devel/message/123940

---

Gyorgy Sarvari (5):
tigervnc: sync xserver component with oe-core
tigervnc: ignore CVE-2014-8241
tigervnc: ignore CVE-2023-6377
tigervnc: ignore CVE-2023-6478
tigervnc: ignore CVE-2025-26594...26601

 ...ncrease-supported-Xorg-version-to-1..patch | 29 ++++++
 ...server21.1.1.patch-Add-Xorg-21-patch.patch | 95 +++++++++++++++++++
 .../files/0001-xvnc-adapt-for-1.21.patch      | 46 +++++++++
 .../tigervnc/tigervnc_1.11.0.bb               | 45 +++++----
 4 files changed, 192 insertions(+), 23 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-xorg-version.h-Increase-supported-Xorg-version-to-1..patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-xserver21.1.1.patch-Add-Xorg-21-patch.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-xvnc-adapt-for-1.21.patch
#1 lore raw

PATCH 1/5 tigervnc: sync xserver component with oe-core

oe-core has a newer version of xserver than this recipe used to compile TigerVNC with. This recipe updates xserver to the same version, 21.1.18.

TigerVNC only started to support this xserver version 2 versions later, with 1.13. Due to this 3 commits were backported that add the missing changes.

---
 ...ncrease-supported-Xorg-version-to-1..patch | 29 ++++++
 ...server21.1.1.patch-Add-Xorg-21-patch.patch | 95 +++++++++++++++++++
 .../files/0001-xvnc-adapt-for-1.21.patch      | 46 +++++++++
 .../tigervnc/tigervnc_1.11.0.bb               | 33 ++-----
 4 files changed, 180 insertions(+), 23 deletions(-)
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-xorg-version.h-Increase-supported-Xorg-version-to-1..patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-xserver21.1.1.patch-Add-Xorg-21-patch.patch
 create mode 100644 meta-oe/recipes-graphics/tigervnc/files/0001-xvnc-adapt-for-1.21.patch
meta-oe/recipes-graphics/tigervnc/files/0001-xorg-version.h-Increase-supported-Xorg-version-to-1..patch new file +29 -0
new file mode 100644
index 0000000000..fd2871976a
@@ -0,0 +1,29 @@
+From 59f302c28cc15f2d7749840a311c2085c75d5833 Mon Sep 17 00:00:00 2001
+From: Gyorgy Sarvari <[email protected]>
+Date: Wed, 24 Nov 2021 21:09:36 +0100
+Subject: [PATCH] xorg-version.h: Increase supported Xorg version to 1.21
+
+From: Joakim Tjernlund <[email protected]>
+
+Upstream-Status: Backport [https://github.com/TigerVNC/tigervnc/commit/736b50d04e1ba965696cd15d456dc2b7fc123150]
+Signed-off-by: Gyorgy Sarvari <[email protected]>
+---
+ unix/xserver/hw/vnc/xorg-version.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/unix/xserver/hw/vnc/xorg-version.h b/unix/xserver/hw/vnc/xorg-version.h
+index 5effe7e9..2449980d 100644
+--- a/unix/xserver/hw/vnc/xorg-version.h
++++ b/unix/xserver/hw/vnc/xorg-version.h
+@@ -36,8 +36,10 @@
+ #define XORG 119
+ #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (20 * 100000) + (99 * 1000))
+ #define XORG 120
++#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (21 * 100000) + (99 * 1000))
++#define XORG 121
+ #else
+-#error "X.Org newer than 1.20 is not supported"
++#error "X.Org newer than 1.21 is not supported"
+ #endif
+ 
+ #endif
meta-oe/recipes-graphics/tigervnc/files/0001-xserver21.1.1.patch-Add-Xorg-21-patch.patch new file +95 -0

95 lines not on this page · raw message

meta-oe/recipes-graphics/tigervnc/files/0001-xvnc-adapt-for-1.21.patch new file +46 -0

46 lines not on this page · raw message

meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb +10 -23
index 5cde7c9fb4..acaac7183e 100644
@@ -21,15 +21,18 @@ SRC_URI = "git://github.com/TigerVNC/tigervnc.git;branch=1.11-branch;protocol=ht
            file://0002-do-not-build-tests-sub-directory.patch \
            file://0003-add-missing-dynamic-library-to-FLTK_LIBRARIES.patch \
            file://0004-tigervnc-add-fPIC-option-to-COMPILE_FLAGS.patch \
+           file://0001-xserver21.1.1.patch-Add-Xorg-21-patch.patch \
+           file://0001-xorg-version.h-Increase-supported-Xorg-version-to-1..patch \
+           file://0001-xvnc-adapt-for-1.21.patch \
 "
 
 # Keep sync with xorg-server in oe-core
 XORG_PN ?= "xorg-server"
-XORG_PV ?= "1.20.6"
-SRC_URI += "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${XORG_PV}.tar.bz2;name=xorg"
+XORG_PV ?= "21.1.18"
+SRC_URI += "${XORG_MIRROR}/individual/xserver/${XORG_PN}-${XORG_PV}.tar.xz;name=xorg"
 XORG_S = "${WORKDIR}/${XORG_PN}-${XORG_PV}"
-SRC_URI[xorg.md5sum] = "a98170084f2c8fed480d2ff601f8a14b"
-SRC_URI[xorg.sha256sum] = "6316146304e6e8a36d5904987ae2917b5d5b195dc9fc63d67f7aca137e5a51d1"
+SRC_URI[xorg.md5sum] = "43225ddc1fd8d7ae7671c25ab6d1f927"
+SRC_URI[xorg.sha256sum] = "c878d1930d87725d4a5bf498c24f4be8130d5b2646a9fd0f2994deff90116352"
 
 # It is the directory containing the Xorg source for the
 # machine on which you are building TigerVNC.
@@ -37,27 +40,11 @@ XSERVER_SOURCE_DIR="${S}/unix/xserver"
 
 do_patch[postfuncs] += "do_patch_xserver"
 do_patch_xserver () {
-    for subdir in Xext xkb GL hw/xquartz/bundle hw/xfree86/common; do
-        install -d ${XSERVER_SOURCE_DIR}/$subdir
-    done
-
-    for subdir in hw/dmx/doc man doc hw/dmx/doxygen; do
-        install -d ${XSERVER_SOURCE_DIR}/$subdir
-    done
-
-    sources="hw/xquartz/bundle/cpprules.in man/Xserver.man doc/smartsched \
-             hw/dmx/doxygen/doxygen.conf.in xserver.ent.in xkb/README.compiled \
-             hw/xfree86/xorgconf.cpp hw/xfree86/Xorg.sh.in"
-    for i in ${sources}; do
-        install -m 0644 ${XORG_S}/$i ${XSERVER_SOURCE_DIR}/$i;
-    done
-
-    cd ${XORG_S}
-    find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | \
-    xargs tar cf - | (cd ${XSERVER_SOURCE_DIR} && tar xf -)
+    # Put the xserver source in the right place in the tigervnc source tree
+    cp -rfl ${XORG_S}/* ${XSERVER_SOURCE_DIR}
 
     cd ${XSERVER_SOURCE_DIR}
-    xserverpatch="${S}/unix/xserver120.patch"
+    xserverpatch="${S}/unix/xserver21.patch"
     echo "Apply $xserverpatch"
     patch -p1 -b --suffix .vnc < $xserverpatch
 }
#2 lore raw

PATCH 2/5 tigervnc: ignore CVE-2014-8241

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2014-8241

The vulnerability is about a potential null-pointer dereference, because of a malloc result is not verified[1].

The vulnerable code has been refactored since completely[2], and the code isn't present anymore in the codebase.

[1]: https://github.com/TigerVNC/tigervnc/issues/993#issuecomment-612874972 - attachment [2]: https://github.com/TigerVNC/tigervnc/commit/b8a24f055f1a29886d8b18bb3f0902144dc5bd14

(cherry picked from commit ed8a1038d227ee521cf2349d9f7f8e37eec6a64a)
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb +2 -0
index acaac7183e..6631995665 100644
@@ -118,3 +118,5 @@ FILES:${PN} += " \
 "
 
 FILES:${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"
+
+CVE_STATUS[CVE-2014-8241] = "fixed-version: The vulnerable code is not present in the used version (1.11.0)"
#3 lore raw

PATCH 3/5 tigervnc: ignore CVE-2023-6377

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2023-6377

TigerVNC compiles its own xserver, this is why this CVE is associated with it - despite the vulnerability being in xserver.

The vulnerability was fixed by [1] (from the nvd report), which has been backported[2] to the xserver version used by the recipe - so ignore the CVE, since it's patched already.

[1]: https://gitlab.freedesktop.org/xorg/xserver/-/commit/0c1a93d319558fe3ab2d94f51d174b4f93810afd
[2]: https://gitlab.freedesktop.org/xorg/xserver/-/commit/a7bda3080d2b44eae668cdcec7a93095385b9652

(cherry picked from commit f691f2178b15eec22f09a1c17b9945fad4e330e6)
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb +1 -0
index 6631995665..fc314e8ac1 100644
@@ -120,3 +120,4 @@ FILES:${PN} += " \
 FILES:${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"
 
 CVE_STATUS[CVE-2014-8241] = "fixed-version: The vulnerable code is not present in the used version (1.11.0)"
+CVE_STATUS[CVE-2023-6377] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
#4 lore raw

PATCH 4/5 tigervnc: ignore CVE-2023-6478

In reply to Gyorgy Sarvari

Details: https://nvd.nist.gov/vuln/detail/CVE-2023-6478

TigerVNC compiles its own xserver, this is why this CVE is associated with it - despite the vulnerability being in xserver.

The vulnerability was fixed by [1] (from the nvd report), which has been backported[2] to the xserver version used by the recipe - so ignore the CVE, since it's patched already.

[1]: https://gitlab.freedesktop.org/xorg/xserver/-/commit/14f480010a93ff962fef66a16412fafff81ad632
[2]: https://gitlab.freedesktop.org/xorg/xserver/-/commit/58e83c683950ac9e253ab05dd7a13a8368b70a3c

(cherry picked from commit 62a78f8ba7c8bd229cc82cf81bcc6a6d8116ebca)
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb +1 -0
index fc314e8ac1..8ff5e3185b 100644
@@ -121,3 +121,4 @@ FILES:${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"
 
 CVE_STATUS[CVE-2014-8241] = "fixed-version: The vulnerable code is not present in the used version (1.11.0)"
 CVE_STATUS[CVE-2023-6377] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2023-6478] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
#5 lore raw

PATCH 5/5 tigervnc: ignore CVE-2025-26594...26601

In reply to Gyorgy Sarvari

Ignore the following CVEs: CVE-2025-26594, CVE-2025-26595, CVE-2025-26596, CVE-2025-26597, CVE-2025-26598, CVE-2025-26599, CVE-2025-26600, CVE-2025-26601

Details:
https://nvd.nist.gov/vuln/detail/CVE-2025-26594
https://nvd.nist.gov/vuln/detail/CVE-2025-26595
https://nvd.nist.gov/vuln/detail/CVE-2025-26596
https://nvd.nist.gov/vuln/detail/CVE-2025-26597
https://nvd.nist.gov/vuln/detail/CVE-2025-26598
https://nvd.nist.gov/vuln/detail/CVE-2025-26599
https://nvd.nist.gov/vuln/detail/CVE-2025-26600
https://nvd.nist.gov/vuln/detail/CVE-2025-26601

TigerVNC compiles its own xserver, this is why these CVEs are associated with it - despite the vulnerabilities being in xserver.

All of these vulnerabilities were fixed by the same PR[1], which has been part of xserver since version 21.1.16 (the currently used xserver version in TigerVNC is 21.1.18).

Due to this, ignore these vulnerabilities, and just mark them as patched.

[1]: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1830

(cherry picked from commit 4924e89bb77fe5486063229c50039a458d60f8ea)
---
 meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta-oe/recipes-graphics/tigervnc/tigervnc_1.11.0.bb +8 -0
index 8ff5e3185b..57b1682e95 100644
@@ -122,3 +122,11 @@ FILES:${PN}-dbg += "${libdir}/xorg/modules/extensions/.debug"
 CVE_STATUS[CVE-2014-8241] = "fixed-version: The vulnerable code is not present in the used version (1.11.0)"
 CVE_STATUS[CVE-2023-6377] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
 CVE_STATUS[CVE-2023-6478] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26594] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26595] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26596] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26597] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26598] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26599] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26600] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"
+CVE_STATUS[CVE-2025-26601] = "fixed-version: The vulnerable code is not present in the used xserver version (21.1.18)"