kumquat-buildroot/package/libvncserver/0002-libvncclient-free-vncRec-memory-in-rfbClientCleanup.patch
Fabrice Fontaine b3ab978703 package/libvncserver: fix CVE-2020-29260
libvncclient v0.9.13 was discovered to contain a memory leak via the
function rfbClientCleanup().

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-11-13 22:56:38 +01:00

29 lines
979 B
Diff

From bef41f6ec4097a8ee094f90a1b34a708fbd757ec Mon Sep 17 00:00:00 2001
From: Christian Beier <info@christianbeier.net>
Date: Sat, 21 Nov 2020 12:52:31 +0100
Subject: [PATCH] libvncclient: free vncRec memory in rfbClientCleanup()
Otherwise we leak memory. Spotted by Ramin Farajpour Cami
<ramin.blackhat@gmail.com>, thanks!
[Retrieved from:
https://github.com/LibVNC/libvncserver/commit/bef41f6ec4097a8ee094f90a1b34a708fbd757ec]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
libvncclient/vncviewer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index d6b91f02b..0a1bdcf6a 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -534,6 +534,8 @@ void rfbClientCleanup(rfbClient* client) {
client->clientData = next;
}
+ free(client->vncRec);
+
if (client->sock != RFB_INVALID_SOCKET)
rfbCloseSocket(client->sock);
if (client->listenSock != RFB_INVALID_SOCKET)