aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2017-08-10 06:59:43 +0000
committerXin LI <delphij@FreeBSD.org>2017-08-10 06:59:43 +0000
commit834a5b0c7d5531cb219e9ce6c42ab7a97b90582d (patch)
tree9e70c8027bce9c432770b6c412b82bca6a293dd2
parenta4f37dd7ce0c1683d9683d0ae2c85a68e2d7561d (diff)
downloadsrc-834a5b0c7d5531cb219e9ce6c42ab7a97b90582d.tar.gz
src-834a5b0c7d5531cb219e9ce6c42ab7a97b90582d.zip
Fix OpenSSH Denial of Service vulnerability. [SA-17:06]
Approved by: so
Notes
Notes: svn path=/releng/10.3/; revision=322344
-rw-r--r--UPDATING4
-rw-r--r--crypto/openssh/auth-passwd.c5
-rw-r--r--sys/conf/newvers.sh2
3 files changed, 10 insertions, 1 deletions
diff --git a/UPDATING b/UPDATING
index f5e4c471fad9..5d952a0875c6 100644
--- a/UPDATING
+++ b/UPDATING
@@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
stable/10, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
+20170810 p21 FreeBSD-SA-17:06.openssh
+
+ Fix OpenSSH Denial of Service vulnerability. [SA-17:06]
+
20170712 p20 FreeBSD-SA-17:05.heimdal
FreeBSD-EN-17:06.hyperv
diff --git a/crypto/openssh/auth-passwd.c b/crypto/openssh/auth-passwd.c
index 63ccf3cabe7d..f6825ecc0655 100644
--- a/crypto/openssh/auth-passwd.c
+++ b/crypto/openssh/auth-passwd.c
@@ -66,6 +66,8 @@ extern login_cap_t *lc;
#define DAY (24L * 60 * 60) /* 1 day in seconds */
#define TWO_WEEKS (2L * 7 * DAY) /* 2 weeks in seconds */
+#define MAX_PASSWORD_LEN 1024
+
void
disable_forwarding(void)
{
@@ -87,6 +89,9 @@ auth_password(Authctxt *authctxt, const char *password)
static int expire_checked = 0;
#endif
+ if (strlen(password) > MAX_PASSWORD_LEN)
+ return 0;
+
#ifndef HAVE_CYGWIN
if (pw->pw_uid == 0 && options.permit_root_login != PERMIT_YES)
ok = 0;
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index 00b799623ebe..9782a67071ab 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="10.3"
-BRANCH="RELEASE-p20"
+BRANCH="RELEASE-p21"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi