Skip to content

Commit 2dca0e3

Browse files
committed
libvncserver: Update to v0.9.15
**Summary** - Release notes can be found [here](https://github.com/LibVNC/libvncserver/releases/tag/LibVNCServer-0.9.15). - Patches for CVE's **Security** Includes fixes for: - CVE-2026-32854 - CVE-2026-32853 Signed-off-by: Jared Cervantes <jared@jaredcervantes.com>
1 parent 44563a1 commit 2dca0e3

6 files changed

Lines changed: 153 additions & 15 deletions

File tree

packages/l/libvncserver/abi_symbols

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ libvncclient.so.1:ReadFromRFBServer
2828
libvncclient.so.1:ReadFromTLS
2929
libvncclient.so.1:SameMachine
3030
libvncclient.so.1:SendClientCutText
31+
libvncclient.so.1:SendClientCutTextUTF8
3132
libvncclient.so.1:SendExtDesktopSize
3233
libvncclient.so.1:SendExtendedKeyEvent
3334
libvncclient.so.1:SendFramebufferUpdateRequest
@@ -89,9 +90,11 @@ libvncclient.so.1:rfbClientEncryptBytes2
8990
libvncclient.so.1:rfbClientErr
9091
libvncclient.so.1:rfbClientExtensions
9192
libvncclient.so.1:rfbClientGetClientData
93+
libvncclient.so.1:rfbClientGetUpdateRect
9294
libvncclient.so.1:rfbClientLog
9395
libvncclient.so.1:rfbClientRegisterExtension
9496
libvncclient.so.1:rfbClientSetClientData
97+
libvncclient.so.1:rfbClientSetUpdateRect
9598
libvncclient.so.1:rfbEnableClientLogging
9699
libvncclient.so.1:rfbGetClient
97100
libvncclient.so.1:rfbHandleAuthResult

packages/l/libvncserver/abi_used_symbols

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ libc.so.6:__isoc99_sscanf
66
libc.so.6:__longjmp_chk
77
libc.so.6:__memcpy_chk
88
libc.so.6:__printf_chk
9+
libc.so.6:__read_chk
910
libc.so.6:__snprintf_chk
1011
libc.so.6:__sprintf_chk
1112
libc.so.6:__stack_chk_fail
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
From 009008e2f4d5a54dd71f422070df3af7b3dbc931 Mon Sep 17 00:00:00 2001
2+
From: Kazuma Matsumoto <269371721+y637F9QQ2x@users.noreply.github.com>
3+
Date: Sun, 22 Mar 2026 20:35:49 +0100
4+
Subject: [PATCH] libvncclient: add bounds checks to UltraZip subrectangle
5+
parsing
6+
7+
HandleUltraZipBPP() iterates over sub-rectangles using numCacheRects
8+
(derived from the attacker-controlled rect.r.x) without validating
9+
that the pointer stays within the decompressed data buffer. A malicious
10+
server can set a large numCacheRects value, causing heap out-of-bounds
11+
reads via the memcpy calls in the parsing loop.
12+
13+
Add bounds checks before reading the 12-byte subrect header and before
14+
advancing the pointer by the raw pixel data size. Use uint64_t for the
15+
raw data size calculation to prevent integer overflow on 32-bit platforms.
16+
---
17+
src/libvncclient/ultra.c | 16 +++++++++++++++-
18+
1 file changed, 15 insertions(+), 1 deletion(-)
19+
20+
diff --git a/src/libvncclient/ultra.c b/src/libvncclient/ultra.c
21+
index 1d3aaba..5633b8c 100644
22+
--- a/src/libvncclient/ultra.c
23+
+++ b/src/libvncclient/ultra.c
24+
@@ -126,6 +126,7 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh)
25+
int toRead=0;
26+
int inflateResult=0;
27+
unsigned char *ptr=NULL;
28+
+ unsigned char *ptr_end=NULL;
29+
lzo_uint uncompressedBytes = ry + (rw * 65535);
30+
unsigned int numCacheRects = rx;
31+
32+
@@ -194,11 +195,18 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh)
33+
34+
/* Put the uncompressed contents of the update on the screen. */
35+
ptr = (unsigned char *)client->raw_buffer;
36+
+ ptr_end = ptr + uncompressedBytes;
37+
for (i=0; i<numCacheRects; i++)
38+
{
39+
unsigned short sx, sy, sw, sh;
40+
unsigned int se;
41+
42+
+ /* subrect header: sx(2) + sy(2) + sw(2) + sh(2) + se(4) = 12 bytes */
43+
+ if (ptr + 12 > ptr_end) {
44+
+ rfbClientLog("UltraZip: subrect %d header exceeds decompressed data bounds\n", i);
45+
+ return FALSE;
46+
+ }
47+
+
48+
memcpy((char *)&sx, ptr, 2); ptr += 2;
49+
memcpy((char *)&sy, ptr, 2); ptr += 2;
50+
memcpy((char *)&sw, ptr, 2); ptr += 2;
51+
@@ -213,8 +221,13 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh)
52+
53+
if (se == rfbEncodingRaw)
54+
{
55+
+ uint64_t rawBytes = (uint64_t)sw * sh * (BPP / 8);
56+
+ if (rawBytes > (size_t)(ptr_end - ptr)) {
57+
+ rfbClientLog("UltraZip: subrect %d raw data exceeds decompressed data bounds\n", i);
58+
+ return FALSE;
59+
+ }
60+
client->GotBitmap(client, (unsigned char *)ptr, sx, sy, sw, sh);
61+
- ptr += ((sw * sh) * (BPP / 8));
62+
+ ptr += (size_t)rawBytes;
63+
}
64+
}
65+
66+
@@ -222,3 +235,4 @@ HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh)
67+
}
68+
69+
#undef CARDBPP
70+
+
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
From dc78dee51a7e270e537a541a17befdf2073f5314 Mon Sep 17 00:00:00 2001
2+
From: Kazuma Matsumoto <269371721+y637F9QQ2x@users.noreply.github.com>
3+
Date: Thu, 19 Mar 2026 17:42:00 +0900
4+
Subject: [PATCH] libvncserver: fix NULL pointer dereferences in httpd proxy
5+
handlers
6+
7+
httpProcessInput() passes the return value of strchr() to atoi()
8+
and strncmp() without checking for NULL. If a CONNECT request
9+
contains no colon, or a GET request contains no slash, strchr()
10+
returns NULL, leading to a segmentation fault.
11+
12+
Add NULL checks before using the strchr() return values.
13+
---
14+
src/libvncserver/httpd.c | 24 ++++++++++++++----------
15+
1 file changed, 14 insertions(+), 10 deletions(-)
16+
17+
diff --git a/src/libvncserver/httpd.c b/src/libvncserver/httpd.c
18+
index f4fe51c..7cefadc 100644
19+
--- a/src/libvncserver/httpd.c
20+
+++ b/src/libvncserver/httpd.c
21+
@@ -353,10 +353,11 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
22+
23+
24+
/* Process the request. */
25+
- if(rfbScreen->httpEnableProxyConnect) {
26+
+if(rfbScreen->httpEnableProxyConnect) {
27+
const static char* PROXY_OK_STR = "HTTP/1.0 200 OK\r\nContent-Type: octet-stream\r\nPragma: no-cache\r\n\r\n";
28+
if(!strncmp(buf, "CONNECT ", 8)) {
29+
- if(atoi(strchr(buf, ':')+1)!=rfbScreen->port) {
30+
+ char *colon = strchr(buf, ':');
31+
+ if(colon == NULL || atoi(colon+1)!=rfbScreen->port) {
32+
rfbErr("httpd: CONNECT format invalid.\n");
33+
rfbWriteExact(&cl,INVALID_REQUEST_STR, strlen(INVALID_REQUEST_STR));
34+
httpCloseSock(rfbScreen);
35+
@@ -369,14 +370,17 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
36+
rfbScreen->httpSock = RFB_INVALID_SOCKET;
37+
return;
38+
}
39+
- if (!strncmp(buf, "GET ",4) && !strncmp(strchr(buf,'/'),"/proxied.connection HTTP/1.", 27)) {
40+
- /* proxy connection */
41+
- rfbLog("httpd: client asked for /proxied.connection\n");
42+
- rfbWriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR));
43+
- rfbNewClientConnection(rfbScreen,rfbScreen->httpSock);
44+
- rfbScreen->httpSock = RFB_INVALID_SOCKET;
45+
- return;
46+
- }
47+
+ if (!strncmp(buf, "GET ",4)) {
48+
+ char *slash = strchr(buf, '/');
49+
+ if (slash != NULL && !strncmp(slash,"/proxied.connection HTTP/1.", 27)) {
50+
+ /* proxy connection */
51+
+ rfbLog("httpd: client asked for /proxied.connection\n");
52+
+ rfbWriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR));
53+
+ rfbNewClientConnection(rfbScreen,rfbScreen->httpSock);
54+
+ rfbScreen->httpSock = RFB_INVALID_SOCKET;
55+
+ return;
56+
+ }
57+
+ }
58+
}
59+
60+
if (strncmp(buf, "GET ", 4)) {
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# yaml-language-server: $schema=/usr/share/ypkg/schema/schema.json
22
name : libvncserver
3-
version : 0.9.14
4-
release : 10
3+
version : 0.9.15
4+
release : 11
55
source :
6-
- https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.14.tar.gz : 83104e4f7e28b02f8bf6b010d69b626fae591f887e949816305daebae527c9a5
6+
- https://github.com/LibVNC/libvncserver/archive/LibVNCServer-0.9.15.tar.gz : 62352c7795e231dfce044beb96156065a05a05c974e5de9e023d688d8ff675d7
77
homepage : https://github.com/LibVNC/libvncserver
88
license : GPL-2.0-or-later
99
component : programming.library
@@ -15,8 +15,11 @@ builddeps :
1515
- pkgconfig(libgcrypt)
1616
- pkgconfig(libturbojpeg)
1717
setup : |
18-
%cmake
18+
%patch -p1 -i ${pkgfiles}/CVE-2026-32854.patch
19+
%patch -p1 -i ${pkgfiles}/CVE-2026-32853.patch
20+
%cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5
1921
build : |
2022
%make
2123
install : |
2224
%make_install
25+
%install_license COPYING

packages/l/libvncserver/pspec_x86_64.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<Name>libvncserver</Name>
44
<Homepage>https://github.com/LibVNC/libvncserver</Homepage>
55
<Packager>
6-
<Name>Reilly Brogan</Name>
7-
<Email>solus@reillybrogan.com</Email>
6+
<Name>Jared Cervantes</Name>
7+
<Email>jared@jaredcervantes.com</Email>
88
</Packager>
99
<License>GPL-2.0-or-later</License>
1010
<PartOf>programming.library</PartOf>
1111
<Summary xml:lang="en">VNC Server Library</Summary>
1212
<Description xml:lang="en">A library for easy implementation of a VNC server.
1313
</Description>
14-
<Archive type="binary" sha1sum="79eb0752a961b8e0d15c77d298c97498fbc89c5a">https://getsol.us/sources/README.Solus</Archive>
14+
<Archive type="binary" sha1sum="79eb0752a961b8e0d15c77d298c97498fbc89c5a">https://sources.getsol.us/README.Solus</Archive>
1515
</Source>
1616
<Package>
1717
<Name>libvncserver</Name>
@@ -20,10 +20,11 @@
2020
</Description>
2121
<PartOf>programming.library</PartOf>
2222
<Files>
23-
<Path fileType="library">/usr/lib64/libvncclient.so.0.9.14</Path>
23+
<Path fileType="library">/usr/lib64/libvncclient.so.0.9.15</Path>
2424
<Path fileType="library">/usr/lib64/libvncclient.so.1</Path>
25-
<Path fileType="library">/usr/lib64/libvncserver.so.0.9.14</Path>
25+
<Path fileType="library">/usr/lib64/libvncserver.so.0.9.15</Path>
2626
<Path fileType="library">/usr/lib64/libvncserver.so.1</Path>
27+
<Path fileType="data">/usr/share/licenses/libvncserver/COPYING</Path>
2728
</Files>
2829
</Package>
2930
<Package>
@@ -33,7 +34,7 @@
3334
</Description>
3435
<PartOf>programming.devel</PartOf>
3536
<RuntimeDependencies>
36-
<Dependency release="10">libvncserver</Dependency>
37+
<Dependency release="11">libvncserver</Dependency>
3738
</RuntimeDependencies>
3839
<Files>
3940
<Path fileType="header">/usr/include/rfb/keysym.h</Path>
@@ -54,12 +55,12 @@
5455
</Files>
5556
</Package>
5657
<History>
57-
<Update release="10">
58-
<Date>2023-08-21</Date>
59-
<Version>0.9.14</Version>
58+
<Update release="11">
59+
<Date>2026-05-16</Date>
60+
<Version>0.9.15</Version>
6061
<Comment>Packaging update</Comment>
61-
<Name>Reilly Brogan</Name>
62-
<Email>solus@reillybrogan.com</Email>
62+
<Name>Jared Cervantes</Name>
63+
<Email>jared@jaredcervantes.com</Email>
6364
</Update>
6465
</History>
6566
</PISI>

0 commit comments

Comments
 (0)