summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/synergy
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/synergy')
-rw-r--r--meta-oe/recipes-support/synergy/synergy/CVE-2020-15117.patch48
-rw-r--r--meta-oe/recipes-support/synergy/synergy_git.bb2
2 files changed, 49 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/synergy/synergy/CVE-2020-15117.patch b/meta-oe/recipes-support/synergy/synergy/CVE-2020-15117.patch
new file mode 100644
index 0000000000..4ad2a45275
--- /dev/null
+++ b/meta-oe/recipes-support/synergy/synergy/CVE-2020-15117.patch
@@ -0,0 +1,48 @@
1From 79efdb7c617b809e1a2daf17441d7a30f7046aa5 Mon Sep 17 00:00:00 2001
2From: Jnewbon <48688400+Jnewbon@users.noreply.github.com>
3Date: Tue, 14 Jul 2020 13:14:40 +0100
4Subject: [PATCH] Merge pull request from GHSA-chfm-333q-gfpp
5
6Attempts to fis DoS to servers with less then 4GB memory
7
8CVE: CVE-2020-15117
9Upstream-Status: Backport [https://github.com/deskflow/deskflow/commit/0a97c2be0da2d0df25cb86dfd642429e7a8bea39]
10Signed-off-by: Peter Marko <peter.marko@siemens.com>
11---
12 src/lib/synergy/ProtocolUtil.cpp | 13 ++++++++++++-
13 1 file changed, 12 insertions(+), 1 deletion(-)
14
15diff --git a/src/lib/synergy/ProtocolUtil.cpp b/src/lib/synergy/ProtocolUtil.cpp
16index d9f5dc324..7d2c37ff8 100644
17--- a/src/lib/synergy/ProtocolUtil.cpp
18+++ b/src/lib/synergy/ProtocolUtil.cpp
19@@ -61,6 +61,9 @@ ProtocolUtil::readf(synergy::IStream* stream, const char* fmt, ...)
20 catch (XIO&) {
21 result = false;
22 }
23+ catch (std::bad_alloc & exception) {
24+ result = false;
25+ }
26 va_end(args);
27 return result;
28 }
29@@ -216,7 +219,15 @@ ProtocolUtil::vreadf(synergy::IStream* stream, const char* fmt, va_list args)
30 // allocate a buffer to read the data
31 UInt8* sBuffer = buffer;
32 if (!useFixed) {
33- sBuffer = new UInt8[len];
34+ try{
35+ sBuffer = new UInt8[len];
36+ }
37+ catch (std::bad_alloc & exception) {
38+ // Added try catch due to GHSA-chfm-333q-gfpp
39+ LOG((CLOG_ERR "ALLOC: Unable to allocate memory %d bytes", len));
40+ LOG((CLOG_DEBUG "bad_alloc detected: Do you have enough free memory?"));
41+ throw exception;
42+ }
43 }
44
45 // read the data
46--
472.30.2
48
diff --git a/meta-oe/recipes-support/synergy/synergy_git.bb b/meta-oe/recipes-support/synergy/synergy_git.bb
index fb767942fe..e215c62620 100644
--- a/meta-oe/recipes-support/synergy/synergy_git.bb
+++ b/meta-oe/recipes-support/synergy/synergy_git.bb
@@ -10,12 +10,12 @@ DEPENDS = "virtual/libx11 libxtst libxinerama curl openssl"
10REQUIRED_DISTRO_FEATURES = "x11" 10REQUIRED_DISTRO_FEATURES = "x11"
11 11
12SRC_URI = "git://github.com/symless/synergy-core;protocol=https;nobranch=1" 12SRC_URI = "git://github.com/symless/synergy-core;protocol=https;nobranch=1"
13SRC_URI += "file://CVE-2020-15117.patch"
13 14
14# Version 1.10.1-stable 15# Version 1.10.1-stable
15SRCREV ?= "1b4c076127687aceac931d269e898beaac1cad9f" 16SRCREV ?= "1b4c076127687aceac931d269e898beaac1cad9f"
16PV = "1.10.1+git" 17PV = "1.10.1+git"
17 18
18S = "${WORKDIR}/git"
19 19
20inherit cmake features_check 20inherit cmake features_check
21 21