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 1059682 - Default cipher ordering doesn't include ECDSA ciphers and doesn't follow current best practice
Default cipher ordering doesn't include ECDSA ciphers and doesn't follow curr...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nss (Show other bugs)
6.5
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Elio Maldonado Batiz
Hubert Kario
Aneta Šteflová Petrová
:
Depends On: 1058767 1059670
Blocks: 1057564
  Show dependency treegraph
 
Reported: 2014-01-30 05:58 EST by Hubert Kario
Modified: 2016-05-10 17:08 EDT (History)
7 users (show)

See Also:
Fixed In Version: nss-3.21.0-2.el6
Doc Type: Release Note
Doc Text:
_nss_ now supports ECDSA certificates By default, the NSS library did not enable TLS cipher suites that use Elliptic Curve Cryptography (ECC). Applications that did not change the NSS default configuration were unable to connect to servers that mandated support for ECC key exchange, such as ECDHE. In particular, connecting to servers that use certificates with ECDSA keys failed. This update changes the default configuration to enable TLS cipher suites that allow using ECC by default. As a result, applications using NSS defaults for communication over TLS can now connect to servers that use certificates with ECDSA keys.
Story Points: ---
Clone Of: 1059670
Environment:
Last Closed: 2016-05-10 17:08:25 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)
Enable ECDSA ciphers by the default (5.73 KB, patch)
2016-01-16 13:48 EST, Elio Maldonado Batiz
no flags Details | Diff
Enable ECDSA ciphers with 3DES by the default (880 bytes, patch)
2016-01-16 13:52 EST, Elio Maldonado Batiz
rrelyea: review+
Details | Diff
Changes to nss.spec - in patch format (1.73 KB, patch)
2016-01-16 14:06 EST, Elio Maldonado Batiz
no flags Details | Diff
ssl differences beetween rhel-6.7.z and rhel-6.8 - in patch format (9.04 KB, patch)
2016-03-10 14:43 EST, Elio Maldonado Batiz
rrelyea: review-
Details | Diff
disables AES_GCM_128 ciphers by default (1.15 KB, patch)
2016-03-10 18:52 EST, Elio Maldonado Batiz
emaldona: review? (rrelyea)
Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0820 normal SHIPPED_LIVE nss bug fix and enhancement update 2016-05-10 18:40:02 EDT

  None (edit)
Description Hubert Kario 2014-01-30 05:58:41 EST
Description of problem:
When curl connects to server using ECDSA certificate, the connection is refused with "no shared ciphers" SSL error.

Version-Release number of selected component (if applicable):
nss-3.15.1-15.el6.x86_64
curl-7.19.7-37.el6_4.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Setup ftps or https server with ECDSA certificates
2. Try to download a file from it using `curl'

Actual results:
Connection refused, no shared cipher.

* About to connect() to localhost port 21 (#0)
*   Trying ::1... Connection refused
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 21 (#0)
< 220 (vsFTPd 2.2.2)
> AUTH SSL
< 234 Proceed with negotiation.
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/CA/certs/ca_cert.pem
  CApath: none
* NSS error -12286
* Error in TLS handshake, trying SSLv3...
> USER anonymous
< 500 OOPS: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher
* Access denied: 500
* Closing connection #0

curl: (67) Access denied: 500


Expected results:
File downloaded, certificate verified successfully.

Additional info:
Looking at ClientHello sent by curl, the only ciphers advertised are:

Cipher Suite: TLS_EMPTY_RENEGOTIATION_INFO_SCSV (0x00ff)
Cipher Suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039)
Cipher Suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 (0x006b)
Cipher Suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA (0x0038)
Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA (0x0035)
Cipher Suite: TLS_RSA_WITH_AES_256_CBC_SHA256 (0x003d)
Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033)
Cipher Suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 (0x0067)
Cipher Suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA (0x0032)
Cipher Suite: TLS_RSA_WITH_RC4_128_SHA (0x0005)
Cipher Suite: TLS_RSA_WITH_RC4_128_MD5 (0x0004)
Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA (0x002f)
Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA256 (0x003c)
Cipher Suite: TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA (0x0016)
Cipher Suite: TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA (0x0013)
Cipher Suite: TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a)


All ECDHE and ECDSA suites are missing.

I'm not sure if advertising support for GCM and SHA-2 suites is correct if client also doesn't advertise TLSv1.2, I don't think it is.

SHA-2 ciphers are placed after their SHA-1 versions, suites that provide PFS are placed before suites that don't support it. RC4 ciphers are not placed last.

The cipher ordering should match ordering from Firefox 27 (with rationale available here https://briansmith.org/browser-ciphersuites-01.html)
Comment 1 Bob Relyea 2014-03-06 17:37:31 EST
To be clear, what hubert is asking for is a change in what NSS enables by default. NOTE: Brian smith's list is two things:

1) what the default cipher order is for NSS.
2) what the default ciphers are that mozilla enables.

The default cipher order should happen upstream (If firefox has a new order, then a new upstream version of NSS will have that order).

The default cipher list is something we can handle either upstream or in redhat (that would be a relatively small patch.

I support Huberts call to make this change, but we should get a comment from RHEL 6 release management. It means a semantic change in RHEL 6 (apps would suddenly start using new ciphers they didn't previously use). We aren't turning any ciphers off, so I think this should be OK.
Comment 4 Elio Maldonado Batiz 2016-01-16 13:42:52 EST
This bug subject 'Default cipher ordering doesn't include ECDSA ciphers and doesn't follow current best practice' has to two parts:

1) Enabling the ECDSA ciphers by default - No problem here.

2) Following current best practice - Problematic and it requires a reordering such as was done upstream and what we did for rhel-7. At first I thought it would be would be a subset of what we did in rhel-7. The problem is that reordering would case a regression on Bug 1159926 where we had to introduce a patch to revert the changes done upstream and keep the table with same order of cipher suites as in nss-3.15.5-3.
Comment 5 Elio Maldonado Batiz 2016-01-16 13:48 EST
Created attachment 1115485 [details]
Enable ECDSA ciphers by the default

Backport to nss-3.19.1 of what I comitted upstream for nss-3.21.
Comment 6 Elio Maldonado Batiz 2016-01-16 13:52 EST
Created attachment 1115486 [details]
Enable ECDSA ciphers with 3DES by the default

This part was not suitable upstream abut we included as a local patch in fedora. The second change is RSA and maybe dropped given that this request is for ECDSA.
Comment 7 Elio Maldonado Batiz 2016-01-16 14:06 EST
Created attachment 1115487 [details]
Changes to nss.spec - in patch format

Assuming we only have the two patches for enabling which don't do reordering.
Comment 8 Elio Maldonado Batiz 2016-01-16 21:45:13 EST
(In reply to Elio Maldonado Batiz from comment #4)
>> is that reordering would case a regression on Bug 1159926 where we had to

Correction: The bug in question is actually Bug 1123092
Comment 11 Elio Maldonado Batiz 2016-01-21 10:52:39 EST
Comment on attachment 1115485 [details]
Enable ECDSA ciphers by the default

Patch no longer needed because we rebased to nss-3.21.0 which has these ciphers enabled by default.
Comment 12 Elio Maldonado Batiz 2016-01-21 10:54:19 EST
Comment on attachment 1115487 [details]
Changes to nss.spec - in patch format

Mot needed, the spec file changed with the rebase to NSS 3.21.
Comment 16 Elio Maldonado Batiz 2016-03-10 14:43 EST
Created attachment 1135043 [details]
ssl differences beetween rhel-6.7.z and rhel-6.8 - in patch format

The lib/ssl differences beetween rhel-6.7.z and rhel-6.8 after all patches have been applied.
Comment 17 Bob Relyea 2016-03-10 17:51:36 EST
OK, we only need to turn off AES GCM 128 by default then.
Comment 18 Bob Relyea 2016-03-10 17:54:59 EST
Comment on attachment 1115486 [details]
Enable ECDSA ciphers with 3DES by the default

r+
Comment 19 Bob Relyea 2016-03-10 17:56:23 EST
Comment on attachment 1135043 [details]
ssl differences beetween rhel-6.7.z and rhel-6.8 - in patch format

based on the regression, let's turn AES_GCM_128 off by default in 6.8. The rest of the patch is fine.
Comment 20 Elio Maldonado Batiz 2016-03-10 18:52 EST
Created attachment 1135069 [details]
disables AES_GCM_128 ciphers by default

as suggested in Comment 19
Comment 21 Hubert Kario 2016-03-11 05:51:41 EST
Problem is, that to fix bug 1123092, we would have to disable also TLS_RSA_WITH_AES_128_GCM_SHA256, which was enabled quite far back.
Comment 28 errata-xmlrpc 2016-05-10 17:08:25 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/RHBA-2016-0820.html

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