openssh: CVE-2016-1907
PATCH v2 1/1 openssh: CVE-2016-1907
Found two more commits for this CVE.
Armin Kuster (1):
openssh: CVE-2016-1907
.../openssh/openssh/CVE-2016-1907_2.patch | 65 ++++ .../openssh/openssh/CVE-2016-1907_3.patch | 329 +++++++++++++++++++++ .../openssh/CVE-2016-1907_upstream_commit.patch | 33 +++ meta/recipes-connectivity/openssh/openssh_7.1p2.bb | 5 +- 4 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_2.patch create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_3.patch create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_upstream_commit.patch
Signature · 1 line
1.9.1
PATCH 1/1 ] openssh: CVE-2016-1907
From: Armin Kuster <[email protected]>
This issue requires three commits:
https://anongit.mindrot.org/openssh.git/commit/?id=ed4ce82dbfa8a3a3c8ea6fa0db113c71e234416c
https://anongit.mindrot.org/openssh.git/commit/?id=f98a09cacff7baad8748c9aa217afd155a4d493f
https://anongit.mindrot.org/openssh.git/commit/?id=2fecfd486bdba9f51b3a789277bb0733ca36e1c0
Signed-off-by Armin Kuster <[email protected]>
--- .../openssh/openssh/CVE-2016-1907_2.patch | 65 ++++ .../openssh/openssh/CVE-2016-1907_3.patch | 329 +++++++++++++++++++++ .../openssh/CVE-2016-1907_upstream_commit.patch | 33 +++ meta/recipes-connectivity/openssh/openssh_7.1p2.bb | 5 +- 4 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_2.patch create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_3.patch create mode 100644 meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_upstream_commit.patch
meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_2.patch new file +65 -0
@@ -0,0 +1,65 @@ +From f98a09cacff7baad8748c9aa217afd155a4d493f Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Tue, 20 Oct 2015 03:36:35 +0000 +Subject: [PATCH] upstream commit + +Replace a function-local allocation with stack memory. + +ok djm@ + +Upstream-ID: c09fbbab637053a2ab9f33ca142b4e20a4c5a17e +Upstream-Status: Backport +CVE: CVE-2016-1907 + +[YOCTO #8935] + +Signed-off-by: Armin Kuster <[email protected]> + +--- + clientloop.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/clientloop.c b/clientloop.c +index 87ceb3d..1e05cba 100644 +--- a/clientloop.c ++++ b/clientloop.c +@@ -1,4 +1,4 @@ +-/* $OpenBSD: clientloop.c,v 1.275 2015/07/10 06:21:53 markus Exp $ */ ++/* $OpenBSD: clientloop.c,v 1.276 2015/10/20 03:36:35 mmcc Exp $ */ + /* + * Author: Tatu Ylonen <[email protected]> + * Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland +@@ -311,11 +311,10 @@ client_x11_get_proto(const char *display, const char *xauth_path, + static char proto[512], data[512]; + FILE *f; + int got_data = 0, generated = 0, do_unlink = 0, i; +- char *xauthdir, *xauthfile; ++ char xauthdir[PATH_MAX] = "", xauthfile[PATH_MAX] = ""; + struct stat st; + u_int now, x11_timeout_real; + +- xauthdir = xauthfile = NULL; + *_proto = proto; + *_data = data; + proto[0] = data[0] = '\0'; +@@ -343,8 +342,6 @@ client_x11_get_proto(const char *display, const char *xauth_path, + display = xdisplay; + } + if (trusted == 0) { +- xauthdir = xmalloc(PATH_MAX); +- xauthfile = xmalloc(PATH_MAX); + mktemp_proto(xauthdir, PATH_MAX); + /* + * The authentication cookie should briefly outlive +@@ -407,8 +404,6 @@ client_x11_get_proto(const char *display, const char *xauth_path, + unlink(xauthfile); + rmdir(xauthdir); + } +- free(xauthdir); +- free(xauthfile); + + /* + * If we didn't get authentication data, just make up some +-- +1.9.1 +
meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_3.patch new file +329 -0
329 lines not on this page · raw message
meta/recipes-connectivity/openssh/openssh/CVE-2016-1907_upstream_commit.patch new file +33 -0
@@ -0,0 +1,33 @@ +From d77148e3a3ef6c29b26ec74331455394581aa257 Mon Sep 17 00:00:00 2001 +From: "[email protected]" <[email protected]> +Date: Sun, 8 Nov 2015 21:59:11 +0000 +Subject: [PATCH] upstream commit + +fix OOB read in packet code caused by missing return + statement found by Ben Hawkes; ok markus@ deraadt@ + +Upstream-ID: a3e3a85434ebfa0690d4879091959591f30efc62 + +Upstream-Status: Backport +CVE: CVE-2016-1907 + +[YOCTO #8935] + +Signed-off-by: Armin Kuster <[email protected]> + +--- + packet.c | 1 + + 1 file changed, 1 insertion(+) + +Index: openssh-7.1p2/packet.c +=================================================================== +--- openssh-7.1p2.orig/packet.c ++++ openssh-7.1p2/packet.c +@@ -1855,6 +1855,7 @@ ssh_packet_process_incoming(struct ssh * + if (len >= state->packet_discard) { + if ((r = ssh_packet_stop_discard(ssh)) != 0) + return r; ++ return SSH_ERR_CONN_CORRUPT; + } + state->packet_discard -= len; + return 0;
meta/recipes-connectivity/openssh/openssh_7.1p2.bb +4 -1
@@ -20,7 +20,10 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://sshdgenkeys.service \ file://volatiles.99_sshd \ file://add-test-support-for-busybox.patch \ - file://run-ptest" + file://run-ptest \ + file://CVE-2016-1907_upstream_commit.patch \ + file://CVE-2016-1907_2.patch \ + file://CVE-2016-1907_3.patch " PAM_SRC_URI = "file://sshd"
Signature · 1 line
1.9.1