new file mode 100644
@@ -0,0 +1,45 @@
+From 69d60935e8b8f6880c02168963c99c10963480f1 Mon Sep 17 00:00:00 2001
+From: Leon Anavi <leon.anavi@konsulko.com>
+Date: Wed, 2 Dec 2026 14:23:28 +0200
+Subject: [PATCH] configure.ac: use pkg-config to detect libdrm
+
+Do not hardcode the host include path /usr/include/drm/ in CPPFLAGS.
+The correct include directory for libdrm is ${includedir}/libdrm, which
+is what pkg-config reports, so use PKG_CHECK_MODULES to obtain both the
+cflags and the libs.
+
+Fixes the following issue when cross-compiling caused because the build
+host headers are used instead of these for the the target build:
+
+ C preprocessor "...gcc -E ..." fails sanity check
+
+Upstream-Status: Submitted [https://github.com/LibVNC/x11vnc/pull/297]
+
+Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
+---
+ configure.ac | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2fd443a..2fab01d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,12 +71,9 @@ AC_ARG_WITH(drm,
+ if test "x$with_drm" != "xno"; then
+ AC_CHECK_FUNCS([drm], HAVE_LIBC_DRM="true")
+ if test -z "$HAVE_LIBC_DRM"; then
+- AC_CHECK_LIB(drm, drmModeGetResources,
+- DRM_LIBS="-ldrm"
+- [AC_DEFINE(HAVE_LIBDRM) HAVE_LIBDRM="true"], ,)
+-
+-
+- CPPFLAGS="$saved_CPPFLAGS -I/usr/include/drm/"
++ PKG_CHECK_MODULES(DRM, [libdrm],
++ [AC_DEFINE(HAVE_LIBDRM) HAVE_LIBDRM="true"
++ CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"], [:])
+ fi
+ fi
+ AC_SUBST(DRM_LIBS)
+--
+2.53.0
+
deleted file mode 100644
@@ -1,27 +0,0 @@
-CVE: CVE-2020-29074
-Upstream-Status: Backport [https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a ]
-Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
-
-
-From 69eeb9f7baa14ca03b16c9de821f9876def7a36a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= <guenal.davalan@uca.fr>
-Date: Wed, 18 Nov 2020 08:40:45 +0100
-Subject: [PATCH] scan: limit access to shared memory segments to current user
-
----
- src/scan.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/scan.c b/src/scan.c
-index 43e00d20..12994d52 100644
---- a/src/scan.c
-+++ b/src/scan.c
-@@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h,
-
- #if HAVE_XSHM
- shm->shmid = shmget(IPC_PRIVATE,
-- xim->bytes_per_line * xim->height, IPC_CREAT | 0777);
-+ xim->bytes_per_line * xim->height, IPC_CREAT | 0600);
-
- if (shm->shmid == -1) {
- rfbErr("shmget(%s) failed.\n", name);
similarity index 85%
rename from meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
rename to meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.17.bb
@@ -6,12 +6,12 @@ LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://src/x11vnc.h;endline=31;md5=e871a2ad004776794b616822dcab6314"
-SRCREV = "87cd0530f438372dda3c70bb491a6fd19f09acc2"
+SRCREV = "e2b726a8c0464051afda01648072af6835aaa5f7"
PV .= "+git"
SRC_URI = "git://github.com/LibVNC/x11vnc;branch=master;protocol=https \
file://starting-fix.patch \
- file://CVE-2020-29074.patch \
+ file://0001-configure.ac-use-pkg-config-to-detect-libdrm.patch \
"
DEPENDS = "\
@@ -28,10 +28,12 @@ inherit pkgconfig autotools features_check
ANY_OF_DISTRO_FEATURES = "x11 fbdev"
PACKAGECONFIG ??= "\
+ drm \
${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} \
"
+PACKAGECONFIG[drm] = "--with-drm,--without-drm,libdrm"
PACKAGECONFIG[avahi] = "--with-avahi,--without-avahi,avahi"
PACKAGECONFIG[xinerama] = "--with-xinerama,--without-xinerama,libxinerama"
PACKAGECONFIG[x11] = "--with-x,--without-x, libxdamage libxext libxfixes libxrandr libxtst virtual/libx11"
Upgrade to release 0.9.17: New Features: - Added option for sending multi-touch commands in uinput. - Introduced mousewheel support in uinput. - Support for up to 8 mouse buttons and XK_Super_L/R mapping to Meta keys during pipeinput/uinput. - Experimental support for double-buffered framebuffer and rawfb DRM/shm key options. - Support for OpenBSD in shm_clear. Bug Fixes: - Fixed TLS handshake errors with OpenSSL 1.1.x and LibreSSL compatibility issues. - Addressed snprintf null destination pointer issue and xfc NULL pointer dereference in cursor. - Resolved various allocation and multiplication overflow bugs. - Fixed format string issues with size_t arguments and corrected acute accents in man pages. - Limited access to shared memory segments to the current user and addressed overly long Unix socket names (CVE-2020-29074). Documentation & Maintenance: - Refactored and updated README with clearer notes on maintainership, Intel quirks, and FAQs about driver lags. - Removed executable bit from text files, fixed typos, and clarified password limit/error messages. - Updated issue templates and added FUNDING.yml for community contributions. - Keywords added to x11vnc.desktop file. Other Changes: - Fixed build issues on 32-bit architectures with 64-bit time_t and support for builds using -fno-common. - Addressed gcc -no-common build compatibility. Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> --- ...e.ac-use-pkg-config-to-detect-libdrm.patch | 45 +++++++++++++++++++ .../x11vnc/files/CVE-2020-29074.patch | 27 ----------- .../{x11vnc_0.9.16.bb => x11vnc_0.9.17.bb} | 6 ++- 3 files changed, 49 insertions(+), 29 deletions(-) create mode 100644 meta-oe/recipes-graphics/x11vnc/files/0001-configure.ac-use-pkg-config-to-detect-libdrm.patch delete mode 100644 meta-oe/recipes-graphics/x11vnc/files/CVE-2020-29074.patch rename meta-oe/recipes-graphics/x11vnc/{x11vnc_0.9.16.bb => x11vnc_0.9.17.bb} (85%)