aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2016-09-26 08:21:29 +0000
committerXin LI <delphij@FreeBSD.org>2016-09-26 08:21:29 +0000
commit6d68fd15f3977c65b8387492f412880906b3e1e4 (patch)
tree806c7dc59da58b99066a4f6675e2866beaf35cf6
parent22240cc94d66867d318513f879a4b336d3998894 (diff)
downloadsrc-6d68fd15f3977c65b8387492f412880906b3e1e4.tar.gz
src-6d68fd15f3977c65b8387492f412880906b3e1e4.zip
Apply upstream revision 3612ff6fcec0e3d1f2a598135fe12177c0419582:
Fix overflow check in BN_bn2dec() Fix an off by one error in the overflow check added by 07bed46 ("Check for errors in BN_bn2dec()"). This fixes a regression introduced in SA-16:26.openssl. Submitted by: jkim PR: 212921 Approved by: so
Notes
Notes: svn path=/releng/10.1/; revision=306336
-rw-r--r--UPDATING4
-rw-r--r--crypto/openssl/crypto/bn/bn_print.c5
-rw-r--r--sys/conf/newvers.sh2
3 files changed, 7 insertions, 4 deletions
diff --git a/UPDATING b/UPDATING
index 0a76a46aa99e..ed8864a8a1f7 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.
+20160926 p29 FreeBSD-SA-16:26.openssl [revised]
+
+ Fix OpenSSL regression introduced in SA-16:26.
+
20160923 p38 FreeBSD-SA-16:26.openssl
Fix multiple OpenSSL vulnerabilitites.
diff --git a/crypto/openssl/crypto/bn/bn_print.c b/crypto/openssl/crypto/bn/bn_print.c
index 51e4f9e51117..0530e7dfd43f 100644
--- a/crypto/openssl/crypto/bn/bn_print.c
+++ b/crypto/openssl/crypto/bn/bn_print.c
@@ -141,14 +141,13 @@ char *BN_bn2dec(const BIGNUM *a)
if (BN_is_negative(t))
*p++ = '-';
- i = 0;
while (!BN_is_zero(t)) {
+ if (lp - bn_data >= bn_data_num)
+ goto err;
*lp = BN_div_word(t, BN_DEC_CONV);
if (*lp == (BN_ULONG)-1)
goto err;
lp++;
- if (lp - bn_data >= bn_data_num)
- goto err;
}
lp--;
/*
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index ce29160f558b..32d465273794 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="10.1"
-BRANCH="RELEASE-p38"
+BRANCH="RELEASE-p39"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi