diff options
Diffstat (limited to 'user/x11vnc')
-rw-r--r-- | user/x11vnc/APKBUILD | 19 | ||||
-rw-r--r-- | user/x11vnc/CVE-2020-29074.patch | 11 | ||||
-rw-r--r-- | user/x11vnc/gcc10.patch | 42 | ||||
-rw-r--r-- | user/x11vnc/time64.patch | 78 |
4 files changed, 142 insertions, 8 deletions
diff --git a/user/x11vnc/APKBUILD b/user/x11vnc/APKBUILD index c68858df3..497c6f127 100644 --- a/user/x11vnc/APKBUILD +++ b/user/x11vnc/APKBUILD @@ -2,26 +2,28 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=x11vnc pkgver=0.9.16 -pkgrel=0 +pkgrel=2 pkgdesc="VNC server for X11 sessions" -url="http://www.karlrunge.com/x11vnc/" +url=" " arch="all" license="GPL-2.0-only" +depends="" makedepends="cairo-dev libjpeg-turbo-dev libvncserver-dev libxcursor-dev - openssl-dev utmps-dev zlib-dev" + openssl-dev utmps-dev zlib-dev autoconf automake" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/LibVNC/x11vnc/archive/$pkgver.tar.gz + time64.patch utmps.patch + gcc10.patch + CVE-2020-29074.patch " prepare() { - cd "$builddir" default_prepare ./autogen.sh } build() { - cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -34,14 +36,15 @@ build() { } check() { - cd "$builddir" make check } package() { - cd "$builddir" make DESTDIR="$pkgdir" install } sha512sums="69f65ee312f8dede6051b401304987502a213c6c28c7f41e855734f11de1fae14d5d493dc9c28b2e4b7c0be55f8dbd3b35dd2610aae910183772c3e626736fec x11vnc-0.9.16.tar.gz -8aaa6d1fd9e795a60cad162f2b21fe96cd3a7076a0c4fae6e6b0021881bd019312a678fa3ed69b694da36ee64cc0601812da5df96c6461baf68b7e70adf6cd4e utmps.patch" +764dc0d22f4b167b7683b1551a6d8cc8ea6745fdd9791422404ef604186930615b52ef1bf66fd03dd9c6eed18845ff4a1e5a235eee80810177e082359a8c4766 time64.patch +8aaa6d1fd9e795a60cad162f2b21fe96cd3a7076a0c4fae6e6b0021881bd019312a678fa3ed69b694da36ee64cc0601812da5df96c6461baf68b7e70adf6cd4e utmps.patch +b7b774c155f326bca1fee4bed22609f1e0236dae5cb2fea96bab18301bc6ae8f9c7fb11ba1950eb9488683bd2d3158b7b16a71948f2c8d483594e36625b3d470 gcc10.patch +7e038a13c18933532725e73769ec44a325064165e7d041e697cb28e8b19c4471ea19e598cb3f59a55375ac0ebebd11c618ecc085a0112f733fdaa3f702ffa444 CVE-2020-29074.patch" diff --git a/user/x11vnc/CVE-2020-29074.patch b/user/x11vnc/CVE-2020-29074.patch new file mode 100644 index 000000000..2982c59b1 --- /dev/null +++ b/user/x11vnc/CVE-2020-29074.patch @@ -0,0 +1,11 @@ +--- x11vnc-0.9.16/src/scan.c 2024-07-23 04:47:17.680000000 +0000 ++++ x11vnc-0.9.16/src/scan.c 2024-07-23 04:48:25.080000000 +0000 +@@ -320,7 +320,7 @@ + + #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); diff --git a/user/x11vnc/gcc10.patch b/user/x11vnc/gcc10.patch new file mode 100644 index 000000000..a32d5785d --- /dev/null +++ b/user/x11vnc/gcc10.patch @@ -0,0 +1,42 @@ +From a48b0b1cd887d7f3ae67f525d7d334bd2feffe60 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <alexander@tsoy.me> +Date: Tue, 28 Jan 2020 22:21:01 +0300 +Subject: [PATCH] Fix build with -fno-common + +GCC 10 defaults to -fno-common +--- + src/util.c | 3 +++ + src/util.h | 6 +++--- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/util.c b/src/util.c +index a82a1a42..6a52ebf4 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -47,6 +47,9 @@ int hxl = 0; + #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD + MUTEX(x11Mutex); + MUTEX(scrollMutex); ++MUTEX(clientMutex); ++MUTEX(inputMutex); ++MUTEX(pointerMutex); + #endif + + int nfix(int i, int n); +diff --git a/src/util.h b/src/util.h +index 35c1afd2..99b5dd1d 100644 +--- a/src/util.h ++++ b/src/util.h +@@ -102,9 +102,9 @@ extern struct timeval _mysleep; + #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD + extern MUTEX(x11Mutex); + extern MUTEX(scrollMutex); +-MUTEX(clientMutex); +-MUTEX(inputMutex); +-MUTEX(pointerMutex); ++extern MUTEX(clientMutex); ++extern MUTEX(inputMutex); ++extern MUTEX(pointerMutex); + #endif + + #define X_INIT INIT_MUTEX(x11Mutex) diff --git a/user/x11vnc/time64.patch b/user/x11vnc/time64.patch new file mode 100644 index 000000000..663684716 --- /dev/null +++ b/user/x11vnc/time64.patch @@ -0,0 +1,78 @@ +--- x11vnc-0.9.16/src/uinput.c.old 2019-01-05 13:22:11.000000000 +0000 ++++ x11vnc-0.9.16/src/uinput.c 2020-01-24 04:49:39.479206612 +0000 +@@ -710,6 +710,7 @@ + static void ptr_move(int dx, int dy) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tv; + int d = direct_rel_fd < 0 ? fd : direct_rel_fd; + + if (injectable && strchr(injectable, 'M') == NULL) { +@@ -720,7 +721,9 @@ + + if (db) fprintf(stderr, "ptr_move(%d, %d) fd=%d\n", dx, dy, d); + +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tv, NULL); ++ ev.input_event_sec = tv.tv_sec; ++ ev.input_event_usec = tv.tv_usec; + ev.type = EV_REL; + ev.code = REL_Y; + ev.value = dy; +@@ -755,6 +758,7 @@ + static void ptr_abs(int x, int y, int p) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tv; + int x0, y0; + int d = direct_abs_fd < 0 ? fd : direct_abs_fd; + +@@ -773,7 +777,9 @@ + + if (db) fprintf(stderr, "ptr_abs(%d, %d => %d %d, p=%d) fd=%d\n", x0, y0, x, y, p, d); + +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tv, NULL); ++ ev.input_event_sec = tv.tv_sec; ++ ev.input_event_usec = tv.tv_usec; + ev.type = EV_ABS; + ev.code = ABS_Y; + ev.value = y; +@@ -950,6 +956,7 @@ + static void button_click(int down, int btn) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tv; + int d = direct_btn_fd < 0 ? fd : direct_btn_fd; + + if (injectable && strchr(injectable, 'B') == NULL) { +@@ -959,7 +966,9 @@ + if (db) fprintf(stderr, "button_click: btn %d %s fd=%d\n", btn, down ? "down" : "up", d); + + memset(&ev, 0, sizeof(ev)); +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tv, NULL); ++ ev.input_event_sec = tv.tv_sec; ++ ev.input_event_usec = tv.tv_usec; + ev.type = EV_KEY; + ev.value = down; + +@@ -1230,6 +1239,7 @@ + void uinput_key_command(int down, int keysym, rfbClientPtr client) { + #ifdef UINPUT_OK + struct input_event ev; ++ struct timeval tv; + int scancode; + allowed_input_t input; + int d = direct_key_fd < 0 ? fd : direct_key_fd; +@@ -1253,7 +1263,9 @@ + if (db) fprintf(stderr, "uinput_key_command: %d -> %d %s fd=%d\n", keysym, scancode, down ? "down" : "up", d); + + memset(&ev, 0, sizeof(ev)); +- gettimeofday(&ev.time, NULL); ++ gettimeofday(&tv, NULL); ++ ev.input_event_sec = tv.tv_sec; ++ ev.input_event_usec = tv.tv_usec; + ev.type = EV_KEY; + ev.code = (unsigned char) scancode; + ev.value = down; |