Bug 1073078 - mod_ssl uses small DHE parameters for non standard RSA keys
Summary: mod_ssl uses small DHE parameters for non standard RSA keys
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: httpd
Version: 7.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Web Stack Team
QA Contact: Martin Frodl
Depends On: 1057687 1071292
Blocks: 1073081 1180223
TreeView+ depends on / blocked
Reported: 2014-03-05 17:39 UTC by Hubert Kario
Modified: 2015-03-05 07:12 UTC (History)
5 users (show)

Fixed In Version: httpd-2.4.6-20.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1180223 (view as bug list)
Last Closed: 2015-03-05 07:12:26 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0325 normal SHIPPED_LIVE Low: httpd security, bug fix, and enhancement update 2015-03-05 11:59:16 UTC

Description Hubert Kario 2014-03-05 17:39:21 UTC
Description of problem:
If the server is using 2047 or 3071 bit RSA keys, mod_ssl will choose 1024 and 2048 bit DHE params respectively.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

openssl req -x509 -newkey rsa:2047 -keyout ${SSLKEY} -out ${SSLCRT} -subj /CN=localhost -nodes -batch

systemctl restart httpd

openssl s_client -CAfile ${SSLCRT} -cipher 'kEDH:!aNULL' -connect localhost:443

Actual results:
No client certificate CA names sent
Server Temp Key: DH, 1024 bits
SSL handshake has read 1459 bytes and written 422 bytes
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-GCM-SHA384
Server public key is 2047 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
    Protocol  : TLSv1.2
    Cipher    : DHE-RSA-AES256-GCM-SHA384
    Session-ID: 33D1A9CFA4B2489CA470D92F06F66FF999C19191F2CC9EAF6A21AEB43CCCC3DD
    Master-Key: 8398AF230C3E4178307E487F350FCF33651B850DD27B9E6B4F1B113BC7ECEE38140034B0CE1BD077BA3A6B3A947D839B
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    Start Time: 1394039024
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)

Expected results:

No client certificate CA names sent
Server Temp Key: DH, 2048 bits

Additional info:
This is problematic because there are multiple applications that sometimes generate 2047 keys while asked for 2048 bit keys (similarly for 1024 bit keys, etc.) [2,3]. On the other hand, there are no known applications that will generate 2049 bit keys when asked for 2048 bit keys. 

We also don't want the DHE key exchange to be the weakest link in the connection, see NIST SP 800-56 [1] Section 5.6.3 for rationale.

 1 - http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf
 2 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661152
 3 - https://groups.google.com/forum/#!msg/mozilla.dev.security.policy/fOtt14fiDaM/W69BdOagitAJ

Comment 9 errata-xmlrpc 2015-03-05 07:12:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.