Skip to contentSkip to conversation

openssh: Fix three CVEs

PATCH New [email protected] 1 participant 1 message Oct 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openssh: Fix three CVEs

From: Dan Tran <[email protected]>

---
 .../openssh/openssh/CVE-2018-20685.patch      |  42 +++
 .../openssh/openssh/CVE-2019-6109_p1.patch    | 278 ++++++++++++++
 .../openssh/openssh/CVE-2019-6109_p2.patch    | 125 ++++++
 .../openssh/openssh/CVE-2019-6111_p1.patch    | 189 ++++++++++
 .../openssh/openssh/CVE-2019-6111_p2.patch    | 357 ++++++++++++++++++
 .../openssh/openssh_7.8p1+git.bb              |   5 +
 6 files changed, 996 insertions(+)
 create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2018-20685.patch
 create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2019-6109_p1.patch
 create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2019-6109_p2.patch
 create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2019-6111_p1.patch
 create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2019-6111_p2.patch
meta/recipes-connectivity/openssh/openssh/CVE-2018-20685.patch new file +42 -0
new file mode 100644
index 0000000000..2c1da37db8
@@ -0,0 +1,42 @@
+From af866e4233acb6b64cb37f7900fe8bff26e4653f Mon Sep 17 00:00:00 2001
+From: "[email protected]" <[email protected]>
+Date: Fri, 16 Nov 2018 03:03:10 +0000
+Subject: [PATCH] upstream: disallow empty incoming filename or ones that refer
+ to the
+
+current directory; based on report/patch from Harry Sintonen
+
+OpenBSD-Commit-ID: f27651b30eaee2df49540ab68d030865c04f6de9
+
+CVE: CVE-2018-20685
+Upstream-Status: Backport
+[https://github.com/openssh/openssh-portable/commit/6010c0303a422a9c5fa8860c061bf7105eb7f8b2]
+
+Signed-off-by: Dan Tran <[email protected]>
+---
+ scp.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/scp.c b/scp.c
+index 60682c68..4f3fdcd3 100644
+--- a/scp.c
++++ b/scp.c
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: scp.c,v 1.197 2018/06/01 04:31:48 dtucker Exp $ */
++/* $OpenBSD: scp.c,v 1.198 2018/11/16 03:03:10 djm Exp $ */
+ /*
+  * scp - secure remote copy.  This is basically patched BSD rcp which
+  * uses ssh to do the data transfer (instead of using rcmd).
+@@ -1106,7 +1106,8 @@ sink(int argc, char **argv)
+ 			SCREWUP("size out of range");
+ 		size = (off_t)ull;
+ 
+-		if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) {
++		if (*cp == '\0' || strchr(cp, '/') != NULL ||
++		    strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) {
+ 			run_err("error: unexpected filename: %s", cp);
+ 			exit(1);
+ 		}
+-- 
+2.22.0.vfs.1.1.57.gbaf16c8
+
meta/recipes-connectivity/openssh/openssh/CVE-2019-6109_p1.patch new file +278 -0

278 lines not on this page · raw message

meta/recipes-connectivity/openssh/openssh/CVE-2019-6109_p2.patch new file +125 -0

125 lines not on this page · raw message

meta/recipes-connectivity/openssh/openssh/CVE-2019-6111_p1.patch new file +189 -0

189 lines not on this page · raw message

meta/recipes-connectivity/openssh/openssh/CVE-2019-6111_p2.patch new file +357 -0

357 lines not on this page · raw message

meta/recipes-connectivity/openssh/openssh_7.8p1+git.bb +5 -0
index f54dfb5de4..aa3ef5ea41 100644
@@ -24,6 +24,11 @@ SRC_URI = "git://github.com/openssh/openssh-portable;branch=master \
            file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
            file://sshd_check_keys \
            file://add-test-support-for-busybox.patch \
+           file://CVE-2018-20685.patch \
+           file://CVE-2019-6109_p1.patch \
+           file://CVE-2019-6109_p2.patch \
+           file://CVE-2019-6111_p1.patch \
+           file://CVE-2019-6111_p2.patch \
            "
 
 PAM_SRC_URI = "file://sshd"
Signature · 1 line
2.17.1