CVE-2016-0701: Infoleak

Published Jan 26, 2016
·
Updated

As per OpenSSL upstream:

Historically OpenSSL only ever generated DH parameters based on "safe" primes. More recently (in version 1.0.2) support was provided for generating X9.42 style parameter files such as those required for RFC 5114 support. The primes used in such files may not be "safe". Where an application is using DH configured with parameters based on primes that are not "safe" then an attacker could use this fact to find a peer's private DH exponent. This attack requires that the attacker complete multiple handshakes in which the peer uses the same private DH exponent. For example this could be used to discover a TLS server's private DH exponent if it's reusing the private DH exponent or it's using a static DH ciphersuite.

OpenSSL provides the option SSLOPSINGLEDHUSE for ephemeral DH (DHE) in TLS. It is not on by default. If the option is not set then the server reuses the same private DH exponent for the life of the server process and would be vulnerable to this attack. It is believed that many popular applications do set this option and would therefore not be at risk.

OpenSSL before 1.0.2f will reuse the key if: - SSLCTXsettmpdh()/SSLsettmpdh() is used and SSLOPSINGLEDHUSE is not set. - SSLCTXsettmpdhcallback()/SSLsettmpdhcallback() is used, and both the parameters and the key are set and SSLOPSINGLEDHUSE is not used. This is an undocumted feature and parameter files don't contain the key. - Static DH ciphersuites are used. The key is part of the certificate and so it will always reuse it. This is only supported in 1.0.2.

It will not reused the key for DHE ciphers suites if: - SSLOPSINGLEDHUSE is set - SSLCTXsettmpdhcallback()/SSLsettmpdhcallback() is used and the callback does not provide the key, only the parameters. The callback is almost always used like this.

Non-safe primes are generated by OpenSSL when using: - genpkey with the dhrfc5114 option. This will write a X9.42 style file including the prime-order subgroup size "q". This is supported since the 1.0.2 version. Older versions can't read the file generated by this. - dhparam with the -dsaparam option. This has always been documented as requiring the single use.

The fix for this issue adds an additional check where a "q" parameter is available (as is the case in X9.42 based parameters). This detects the only known attack, and is the only possible defense for static DH ciphersuites.

This could have some performance impact.

Additionally the SSLOPSINGLEDHUSE option has been switched on by default and cannot be disabled. This could have some performance impact.

This issue affects OpenSSL versions 1.0.2.

OpenSSL 1.0.2 users should upgrade to 1.0.2f

This issue was reported to OpenSSL on 12 January 2016 by Antonio Sanso. The fix was developed by Matt Caswell of the OpenSSL development team (incorporating some work originally written by Stephen Henson of the OpenSSL core team).

Other sources

It was found that OpenSSL used weak Diffie-Hellman parameters based on unsafe primes, which were generated and stored in X9.42-style parameter files. An attacker who could force the peer to perform multiple handshakes using the same private DH component could use this flaw to conduct man-in-the-middle attacks on the SSL/TLS connection.

The DHcheckpubkey function in crypto/dh/dhcheck.c in OpenSSL 1.0.2 before 1.0.2f does not ensure that prime numbers are appropriate for Diffie-Hellman (DH) key exchange, which makes it easier for remote attackers to discover a private DH exponent by making multiple handshakes with a peer that chose an inappropriate number, as demonstrated by a number in an X9.42 file.

Affected Software

9 affected components
OpenSSL OpenSSL=1.0.2
OpenSSL OpenSSL=1.0.2-beta1
OpenSSL OpenSSL=1.0.2-beta2
OpenSSL OpenSSL=1.0.2-beta3
OpenSSL OpenSSL=1.0.2a
OpenSSL OpenSSL=1.0.2b
OpenSSL OpenSSL=1.0.2c
OpenSSL OpenSSL=1.0.2d
OpenSSL OpenSSL=1.0.2e

Event History

Jan 26, 2016
Data Sourced
07:26 AM
DescriptionSeverityAffected Software
Jan 28, 2016
CVE Published
12:00 AM
Data Sourced
12:00 AM
Remedy
Feb 15, 2016
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description

Frequently Asked Questions

1

What is the severity of CVE-2016-0701?

CVE-2016-0701 is considered to have a moderate severity due to potential key recovery issues in OpenSSL.

2

How do I fix CVE-2016-0701?

To fix CVE-2016-0701, upgrade to a newer version of OpenSSL that addresses this vulnerability.

3

What versions of OpenSSL are affected by CVE-2016-0701?

CVE-2016-0701 affects OpenSSL versions 1.0.2 to 1.0.2e, including several beta releases.

4

What are the potential impacts of CVE-2016-0701?

The potential impacts of CVE-2016-0701 include the risk of key recovery attacks on Diffie-Hellman key exchanges.

5

Is CVE-2016-0701 related to secure communications?

Yes, CVE-2016-0701 directly impacts secure communications by affecting the generation of Diffie-Hellman parameters.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203