Bug 1057687

Summary: Custom/big DH parameters not supported
Product: Red Hat Enterprise Linux 7 Reporter: Hubert Kario <hkario>
Component: httpdAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.0CC: hkario, jorton
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1057656
: 1064878 (view as bug list) Environment:
Last Closed: 2014-03-06 11:53:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1057656, 1064878, 1071883    
Bug Blocks: 1073078, 1073081, 1180223    

Description Hubert Kario 2014-01-24 15:35:38 UTC
Description of problem:
When using DHE based cipher suites, the offered DH parameters by mod_ssl are always 1024 bit sized, even if the certificate used is 2048 bit.
This makes httpd not compliant with NIST SP 800-131A when DHE cipher suite is negotiated since 1st of January this year.

Version-Release number of selected component (if applicable):
httpd-2.4.6-13.el7.x86_64
mod_ssl-2.4.6-13.el7.x86_64
nss-3.15.3-4.el7.x86_64
openssl-1.0.1e-29.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Generate RSA certificates that are 2048bit long
2. Generate 2048 bit DH parameters, add them to file referenced by SSLCertificateFile
3. Connect using tstclnt -d /etc/pki/nssdb/ -h localhost -p 443 -V ssl3: -o -v

Actual results:
tstclnt: SSL version 3.3 using 256-bit AES with 160-bit SHA1 MAC
tstclnt: Server Auth: 2048-bit RSA, Key Exchange: 1024-bit DHE
         Compression: NULL

Expected results:
tstclnt: SSL version 3.3 using 256-bit AES with 160-bit SHA1 MAC
tstclnt: Server Auth: 2048-bit RSA, Key Exchange: 2048-bit DHE
         Compression: NULL

(note Key Exchange in second line)

Additional info:
http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf

Httpd should automatically select DH parameters that are at least as long as the RSA keys (see SP 800-131A and SP 800-57 Part 1).

Comment 1 Joe Orton 2014-01-24 15:48:48 UTC
This is done upstream already in 2.4.7:

http://svn.apache.org/r1542327

Comment 2 Hubert Kario 2014-01-24 16:16:08 UTC
httpd also doesn't select correct curve for ECDHE when the RSA keys are big (i.e. >7680bits), making it impossible to make ECDHE suites conform to NIST SP 800-57 at higher security ratings than 128 bits.

Actual results:
tstclnt: SSL version 3.3 using 128-bit AES with 256-bit SHA256 MAC
tstclnt: Server Auth: 8192-bit RSA, Key Exchange: 256-bit ECDHE
         Compression: NULL

Expected results:
tstclnt: SSL version 3.3 using 128-bit AES with 256-bit SHA256 MAC
tstclnt: Server Auth: 8192-bit RSA, Key Exchange: 384-bit ECDHE
         Compression: NULL

(ignore AES-128 as NSS doesn't support SHA384 in TLS context and openssl s_sclient doesn't report ECDHE parameters size)

Comment 9 Hubert Kario 2014-03-05 17:57:39 UTC
Automatic selection of ECDHE curves doesn't need to be fixed now, configuration with security levels over 128 bit is non trivial (requires also disabling session tickets) and the feature requires not implemented functionality in openssl (without which interoperability may be heavily impacted).

I will create ECDHE specific bug once this issue is resolved.

Comment 10 Joe Orton 2014-03-06 11:32:00 UTC
This bug is partially fixed as bug 1071292 (really a dupe of this one).

Hubert has filed bug 1073078 and bug 1073081 to track further improvement.  Shall we have another bug for auto selection of ECDHE curves, or we could reuse this one?

Comment 11 Hubert Kario 2014-03-06 11:49:16 UTC
I think that another bug would be cleaner

Comment 12 Joe Orton 2014-03-06 11:53:51 UTC
OK, I'm duping this against 1071292.

*** This bug has been marked as a duplicate of bug 1071292 ***