Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1335919 - NSS: Disable TLS connections with less than 1023-bit DH parameters
NSS: Disable TLS connections with less than 1023-bit DH parameters
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nss (Show other bugs)
6.9
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Daiki Ueno
Hubert Kario
Mirek Jahoda
:
Depends On:
Blocks: 1343211 1335911 1397979
  Show dependency treegraph
 
Reported: 2016-05-13 10:26 EDT by Nikos Mavrogiannopoulos
Modified: 2017-09-25 08:56 EDT (History)
10 users (show)

See Also:
Fixed In Version: nss-3.27.1-1.el6
Doc Type: Deprecated Functionality
Doc Text:
*NSS* clients using *TLS* with less than 1024-bit DH are not allowed This change prevents *NSS* clients from connecting to servers with Diffie-Hellman (DH) parameters less than 1024 bits. This ensures that allowed clients using *NSS* are not vulnerable to attacks such as the LOGJAM attack. A system administrator can enable shorter DH parameter support by modifying the `/etc/pki/nss-legacy/nss-rhel6.config` policy configuration file to: library= name=Policy NSS=flags=policyOnly,moduleDB config="allow=DH-MIN=767:DSA-MIN=767:RSA-MIN=767" Note that an empty line is required at the end of the file.
Story Points: ---
Clone Of: 1335915
Environment:
Last Closed: 2017-03-21 06:26:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3194192 None None None 2017-09-25 05:57 EDT
Red Hat Product Errata RHEA-2017:0671 normal SHIPPED_LIVE nspr and nss bug fix update 2017-03-21 08:35:29 EDT

  None (edit)
Description Nikos Mavrogiannopoulos 2016-05-13 10:26:26 EDT
RHEL includes several cryptographic components who's security doesn't remain constant over time. Algorithms such as (cryptographic) hashing and encryption typically have a lifetime after which they are considered either too risky to use or plain insecure. That would mean we need to phase out such algorithms from the default settings, or completely disable if they could cause irreparable issue. 

This bug is about disabling any TLS connections which utilize less than 1024-bit Diffie-Hellman parameters, while at the same hand providing a configuration method for these parameters to be allowed when needed.

For future extensibility in RHEL-7 it is recommended for any introduced configuration method to be re-usable for future algorithm or parameter deprecation (e.g., SHA1 or less than 1024-bit RSA/DH parameters), and ideally part of upstream.
Comment 3 Kai Engert (:kaie) 2016-09-30 05:34:03 EDT
Nikos, we must clarify, what should be done for DH parameters of EXACTLY 1024 bit?

Disable, or keep enabled?
Comment 4 Kai Engert (:kaie) 2016-09-30 05:39:31 EDT
Let's assume, that Nikos want us to disable the DH params with exactly 1024 bit.

Hubert, you said in the past, we require 1024 bit for Java compatibility.

And we had implemented API SSL_EnableWeakDHEPrimeGroup to provide support for 1024 bit compatibility.

Does that mean, we should patch SSL_EnableWeakDHEPrimeGroup to NOT enable the 1024 bit group?

Open question, should it return a failure, or should it be a no-operation?
Comment 5 Kai Engert (:kaie) 2016-09-30 05:42:48 EDT
Daiki pointed me to a patch in RHEL 6.x, which shows, that upstream requires a minimum DH size of 1023 bits.

We had decreased that limit in previous RHEL 6.x to 768 bits.

Should we use the same as upstream, and increase the limit to 1023 ?
Comment 9 Hubert Kario 2016-09-30 06:53:46 EDT
(In reply to Kai Engert (:kaie) from comment #4)
> Let's assume, that Nikos want us to disable the DH params with exactly 1024
> bit.
> 
> Hubert, you said in the past, we require 1024 bit for Java compatibility.
> 
> And we had implemented API SSL_EnableWeakDHEPrimeGroup to provide support
> for 1024 bit compatibility.
> 
> Does that mean, we should patch SSL_EnableWeakDHEPrimeGroup to NOT enable
> the 1024 bit group?
> 
> Open question, should it return a failure, or should it be a no-operation?

If the system policy is to disable 1024 bit DH and application tries to enable 1024 bit DH, in my opinion the call should fail.

Similarly to how trying to generate 256 bit RSA key now will fail.

Rationale being:
1. the application should not use this API by default, it should require explicit setting by user (so user should be able to disable use of that api in application)
2. even in the case the application is broken and forces that setting on user, the user can change the system policy to legacy where the call should succeed
Comment 10 Kai Engert (:kaie) 2016-09-30 07:30:37 EDT
I believe the summary of this bug should be changed to:

  "Disable ... with less than 1023-bit DH"

If this is what we do, then we'll continue to support the 1024-bit DH, and the current APIs don't need to be changed, because we'd still allow the application to allow the 1024 bit groups.

(I hope I'm not confusing anything between DH and DHE?)

Possibly, the only change necessary here is to remove this patch?

http://pkgs.devel.redhat.com/cgit/rpms/nss/tree/ssl-server-min-key-sizes.patch?h=rhel-6.9
Comment 11 Hubert Kario 2016-09-30 08:24:43 EDT
(In reply to Kai Engert (:kaie) from comment #10)
> I believe the summary of this bug should be changed to:
> 
>   "Disable ... with less than 1023-bit DH"
> 
> If this is what we do, then we'll continue to support the 1024-bit DH, and
> the current APIs don't need to be changed, because we'd still allow the
> application to allow the 1024 bit groups.

yes, we want to continue to support 1024 bit

while dropping support for 1023 bit at the same time is an arbitrary threshold, I haven't see any servers that advertise 1023 bit DH parameters (unlike RSA keys)
 
> (I hope I'm not confusing anything between DH and DHE?)

while there is a difference between (static) DH and DHE, NSS only supports the latter, and in that case it's all unambitious 
 
> Possibly, the only change necessary here is to remove this patch?
> 
> http://pkgs.devel.redhat.com/cgit/rpms/nss/tree/ssl-server-min-key-sizes.
> patch?h=rhel-6.9

no, it's not sufficient. The change in question must be reversible by changing system configuration, yes the default should match the upstream behaviour, but user needs to be able to set the NSS behaviour to the way NSS behaved in the past
Comment 14 Hubert Kario 2016-11-23 13:37:31 EST
Issue with NSS requiring an empty line at the end of policy file before it is recognised is tracked in bug 1397979.
Comment 19 errata-xmlrpc 2017-03-21 06:26:42 EDT
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.

https://rhn.redhat.com/errata/RHEA-2017-0671.html
Comment 20 daniel 2017-09-25 05:57:51 EDT
cannot find this in release docs, could someone please point me to where this is stated in the official docs? 
Other wise I am inclined to reopen this bug until docs text is included in release notes

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