diff options
author | Armin Kuster <akuster@mvista.com> | 2016-09-17 21:09:43 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-23 15:27:05 +0100 |
commit | a837c6be8f722e013fdaec70ae2a88fb739dbf9c (patch) | |
tree | 9a5c6aa1c0ad3be78d4335cd1998e86d0e059f0d | |
parent | 414aad04b631baddfc8e3dd02c305da0ddf9b883 (diff) | |
download | poky-a837c6be8f722e013fdaec70ae2a88fb739dbf9c.tar.gz |
openssh: Security fix CVE-2016-5615
openssh < 7.3
(From OE-Core rev: 800bd6e734837a16dfe0f2f0e6591f7a1b37a593)
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh/CVE-2016-6515.patch | 54 | ||||
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh_7.1p2.bb | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/CVE-2016-6515.patch b/meta/recipes-connectivity/openssh/openssh/CVE-2016-6515.patch new file mode 100644 index 0000000000..c721902595 --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh/CVE-2016-6515.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From fcd135c9df440bcd2d5870405ad3311743d78d97 Mon Sep 17 00:00:00 2001 | ||
2 | From: "dtucker@openbsd.org" <dtucker@openbsd.org> | ||
3 | Date: Thu, 21 Jul 2016 01:39:35 +0000 | ||
4 | Subject: [PATCH] upstream commit | ||
5 | |||
6 | Skip passwords longer than 1k in length so clients can't | ||
7 | easily DoS sshd by sending very long passwords, causing it to spend CPU | ||
8 | hashing them. feedback djm@, ok markus@. | ||
9 | |||
10 | Brought to our attention by tomas.kuthan at oracle.com, shilei-c at | ||
11 | 360.cn and coredump at autistici.org | ||
12 | |||
13 | Upstream-ID: d0af7d4a2190b63ba1d38eec502bc4be0be9e333 | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | CVE: CVE-2016-6515 | ||
17 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
18 | |||
19 | --- | ||
20 | auth-passwd.c | 7 ++++++- | ||
21 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/auth-passwd.c b/auth-passwd.c | ||
24 | index 530b5d4..996c2cf 100644 | ||
25 | --- a/auth-passwd.c | ||
26 | +++ b/auth-passwd.c | ||
27 | @@ -1,4 +1,4 @@ | ||
28 | -/* $OpenBSD: auth-passwd.c,v 1.44 2014/07/15 15:54:14 millert Exp $ */ | ||
29 | +/* $OpenBSD: auth-passwd.c,v 1.45 2016/07/21 01:39:35 dtucker Exp $ */ | ||
30 | /* | ||
31 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | ||
32 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | ||
33 | @@ -66,6 +66,8 @@ extern login_cap_t *lc; | ||
34 | #define DAY (24L * 60 * 60) /* 1 day in seconds */ | ||
35 | #define TWO_WEEKS (2L * 7 * DAY) /* 2 weeks in seconds */ | ||
36 | |||
37 | +#define MAX_PASSWORD_LEN 1024 | ||
38 | + | ||
39 | void | ||
40 | disable_forwarding(void) | ||
41 | { | ||
42 | @@ -87,6 +89,9 @@ auth_password(Authctxt *authctxt, const char *password) | ||
43 | static int expire_checked = 0; | ||
44 | #endif | ||
45 | |||
46 | + if (strlen(password) > MAX_PASSWORD_LEN) | ||
47 | + return 0; | ||
48 | + | ||
49 | #ifndef HAVE_CYGWIN | ||
50 | if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES) | ||
51 | ok = 0; | ||
52 | -- | ||
53 | 2.7.4 | ||
54 | |||
diff --git a/meta/recipes-connectivity/openssh/openssh_7.1p2.bb b/meta/recipes-connectivity/openssh/openssh_7.1p2.bb index 6de1284f84..fa449ba8ae 100644 --- a/meta/recipes-connectivity/openssh/openssh_7.1p2.bb +++ b/meta/recipes-connectivity/openssh/openssh_7.1p2.bb | |||
@@ -28,6 +28,7 @@ SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar | |||
28 | file://CVE-2016-6210.patch \ | 28 | file://CVE-2016-6210.patch \ |
29 | file://CVE-2016-6210_p2.patch \ | 29 | file://CVE-2016-6210_p2.patch \ |
30 | file://CVE-2016-6210_p3.patch \ | 30 | file://CVE-2016-6210_p3.patch \ |
31 | file://CVE-2016-6515.patch \ | ||
31 | " | 32 | " |
32 | 33 | ||
33 | PAM_SRC_URI = "file://sshd" | 34 | PAM_SRC_URI = "file://sshd" |