[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Rich Salz
rsalz at openssl.org
Mon Aug 28 17:34:00 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 068b963bb7afc57f5bdd723de0dd15e7795d5822 (commit)
from 7c188d4af022700961882971b90b70ac71702470 (commit)
- Log -----------------------------------------------------------------
commit 068b963bb7afc57f5bdd723de0dd15e7795d5822
Author: Rich Salz <rsalz at openssl.org>
Date: Tue Aug 22 11:44:41 2017 -0400
Avoid out-of-bounds read
Fixes CVE 2017-3735
Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4276)
(cherry picked from commit b23171744b01e473ebbfd6edad70c1c3825ffbcd)
-----------------------------------------------------------------------
Summary of changes:
crypto/x509v3/v3_addr.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/crypto/x509v3/v3_addr.c b/crypto/x509v3/v3_addr.c
index ef1d775..c5183a1 100644
--- a/crypto/x509v3/v3_addr.c
+++ b/crypto/x509v3/v3_addr.c
@@ -84,10 +84,12 @@ static int length_from_afi(const unsigned afi)
*/
unsigned int X509v3_addr_get_afi(const IPAddressFamily *f)
{
- return ((f != NULL &&
- f->addressFamily != NULL && f->addressFamily->data != NULL)
- ? ((f->addressFamily->data[0] << 8) | (f->addressFamily->data[1]))
- : 0);
+ if (f == NULL
+ || f->addressFamily == NULL
+ || f->addressFamily->data == NULL
+ || f->addressFamily->length < 2)
+ return 0;
+ return (f->addressFamily->data[0] << 8) | f->addressFamily->data[1];
}
/*
More information about the openssl-commits
mailing list