from https://github.com/openssl/openssl/commit/3984ef0b7 (advisory forwarded
below). is it ok to just use this directly?
Index: dh_key.c
===================================================================
RCS file: /cvs/src/lib/libcrypto/dh/dh_key.c,v
retrieving revision 1.27
diff -u -p -r1.27 dh_key.c
--- dh_key.c 29 Jan 2017 17:49:22 -0000 1.27
+++ dh_key.c 12 Jun 2018 14:08:13 -0000
@@ -104,10 +104,15 @@ generate_key(DH *dh)
int ok = 0;
int generate_new_key = 0;
unsigned l;
- BN_CTX *ctx;
+ BN_CTX *ctx = NULL;
BN_MONT_CTX *mont = NULL;
BIGNUM *pub_key = NULL, *priv_key = NULL;
+ if (BN_num_bits(dh->p) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH_F_GENERATE_KEY, DH_R_MODULUS_TOO_LARGE);
+ return 0;
+ }
+
ctx = BN_CTX_new();
if (ctx == NULL)
goto err;
----- Forwarded message from OpenSSL <[email protected]> -----
From: OpenSSL <[email protected]>
Organization: OpenSSL Project
Date: Tue, 12 Jun 2018 10:18:03 +0000
To: [email protected], OpenSSL User Support ML
<[email protected]>, OpenSSL Announce ML
<[email protected]>
Reply-To: [email protected], [email protected]
User-Agent: Mutt/1.5.24 (2015-08-30)
Subject: [openssl-announce] OpenSSL Security Advisory
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
OpenSSL Security Advisory [12 June 2018]
========================================
Client DoS due to large DH parameter (CVE-2018-0732)
====================================================
Severity: Low
During key agreement in a TLS handshake using a DH(E) based ciphersuite a
malicious server can send a very large prime value to the client. This will
cause the client to spend an unreasonably long period of time generating a key
for this prime resulting in a hang until the client has finished. This could be
exploited in a Denial Of Service attack.
Due to the low severity of this issue we are not issuing a new release of
OpenSSL 1.1.0 or 1.0.2 at this time. The fix will be included in OpenSSL 1.1.0i
and OpenSSL 1.0.2p when they become available. The fix is also available in
commit ea7abeeab (for 1.1.0) and commit 3984ef0b7 (for 1.0.2) in the OpenSSL git
repository.
This issue was reported to OpenSSL on 5th June 2018 by Guido Vranken who also
developed the fix.
References
==========
URL for this Security Advisory:
https://www.openssl.org/news/secadv/20180612.txt
Note: the online version of the advisory may be updated with additional details
over time.
For details of OpenSSL severity classifications please see:
https://www.openssl.org/policies/secpolicy.html
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEhlersmDwVrHlGQg52cTSbQ5gRJEFAlsfnTgACgkQ2cTSbQ5g
RJE9Twf/VSgXaFPlW+JyA2BAiwGREMr/oMQe8mhmka3WQgNb7oMQRxk4ZqwRvLi2
ggPVOQilJ+tkXgeifEQ3SDRxDnnmcUvxbWB8Lt+7tjhM6O+GYGbGbzupnkBs2IIY
72vll4l7ySMQ8/fcdU/uuNyObfigLC9XndH3tEewxffs6uvDxMyGhZmNQpq1aZNj
rGj3dETUuO/Ln8siAD7nkv9xodRINViMP76fSKAtdaikvZa3uhLBMhX5tOzpR/ta
tc2+6uthdU9JjSRZZpfDlzzhsOFqMrLfOLrJQIIXshxUNeOZyJCkmT9ED8XZRDMB
twb1kOxCKz8Ky+Xm/Rki9uRVoZFjBg==
=kKic
-----END PGP SIGNATURE-----
--
openssl-announce mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-announce
----- End forwarded message -----