Bug 1019254 - ECDHE: now supported in Fedora's OpenSSL
ECDHE: now supported in Fedora's OpenSSL
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: postfix (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaroslav Škarvada
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks: ecc
  Show dependency treegraph
 
Reported: 2013-10-15 07:23 EDT by Harald Reindl
Modified: 2014-01-07 04:43 EST (History)
3 users (show)

See Also:
Fixed In Version: postfix-2.10.2-3.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-07 04:43:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Harald Reindl 2013-10-15 07:23:08 EDT
that is the state of OpenSSL in Fedora after this morining
https://bugzilla.redhat.com/show_bug.cgi?id=319901#c108
Comment 1 Harald Reindl 2013-10-15 07:31:30 EDT
since OpenSSL in Fedora from now on supports ECDHE
depending software needs to be rebuilt to make use
of it as well as libraries like NSS/GNUTLS should
do the same and depending packages like Firefox
needs a rebuild against refreshed NSS to support 
it also on the client side

i made some triage today
_____________________________________________________

openssl:
https://bugzilla.redhat.com/show_bug.cgi?id=319901#c108

nss-softokn
https://bugzilla.redhat.com/show_bug.cgi?id=1019244

nss
https://bugzilla.redhat.com/show_bug.cgi?id=1019245

firefox
https://bugzilla.redhat.com/show_bug.cgi?id=1019247

thunderbird:
https://bugzilla.redhat.com/show_bug.cgi?id=1019249

httpd:
https://bugzilla.redhat.com/show_bug.cgi?id=1019251

dovecot:
https://bugzilla.redhat.com/show_bug.cgi?id=1019253

postfix:
https://bugzilla.redhat.com/show_bug.cgi?id=1019254

openssh:
https://bugzilla.redhat.com/show_bug.cgi?id=1019256

dbmail:
https://bugzilla.redhat.com/show_bug.cgi?id=1019259
Comment 2 Fedora Update System 2013-10-23 05:39:33 EDT
postfix-2.10.2-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/postfix-2.10.2-2.fc20
Comment 3 Fedora Update System 2013-10-23 05:45:46 EDT
postfix-2.10.2-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/postfix-2.10.2-2.fc19
Comment 4 Fedora Update System 2013-10-23 05:50:11 EDT
postfix-2.9.7-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/postfix-2.9.7-2.fc18
Comment 5 Fedora Update System 2013-10-23 13:32:04 EDT
Package postfix-2.10.2-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing postfix-2.10.2-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19768/postfix-2.10.2-2.fc20
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-10-31 23:57:06 EDT
postfix-2.10.2-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2013-10-31 23:58:40 EDT
postfix-2.9.7-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2013-11-10 01:23:59 EST
postfix-2.10.2-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Scott Shambarger 2013-12-23 05:31:59 EST
Just upgraded to F20, and tried to use ECDHE with postfix:

# openssl s_client -connect localhost:25 -starttls smtp -cipher kEECDH
140691508164480:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:741:
---
no peer certificate available
...

Here's the relevant config:
# postconf | egrep 'eecdh|cipherlist'
smtpd_tls_eecdh_grade = strong
tls_eecdh_strong_curve = prime256v1
tls_high_cipherlist = EECDH+AESGCM:EECDH+AES:EECDH+RC4:DH+aRSA+AES+SHA:+TLSv1+AES:RSA+AESGCM:RSA+AES:RSA+RC4+SHA:+TLSv1+RSA+AES:!aECDSA

Checking the code, I should get a warning if I set smtpd_tls_eecdh_grade to an invalid value, eg:
smtpd_tls_eecdh_grade = bogus

But connecting with this configuration does not show a warning, so the build appears to have excluded the EEC code in src/tls/tls_dh.c -- which has the code wrapped in:

#if OPENSSL_VERSION_NUMBER >= 0x1000000fL && !defined(OPENSSL_NO_ECDH)
#endif

Can you try building again with the correct library options?

Thanks.
Comment 10 Scott Shambarger 2013-12-23 05:35:18 EST
BTW, since this was closed, should I open a new bug?
Comment 11 Harald Reindl 2013-12-23 05:50:05 EST
don't touch config params you do not understand
tls_high_cipherlist is for sure not builtin
___________________________________________________

Dec 23 11:45:09 testserver postfix/smtp[13888]: Untrusted TLS connection established to 192.168.196.1[192.168.196.1]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Dec 23 11:45:09 testserver postfix/smtp[13888]: 3dnxz91sWWz28mQ: to=<rhsoft@test.rh>, relay=192.168.196.1[192.168.196.1]:25, delay=0.59, delays=0.02/0.12/0.31/0.14, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 3dnxz95dByzBx51)
Dec 23 11:45:09 testserver postfix/qmgr[979]: 3dnxz91sWWz28mQ: removed

[root@testserver:~]$ cat /etc/redhat-release 
Fedora release 20 (Heisenbug)

[root@testserver:~]$ postconf | egrep 'eecdh|cipherlist'
smtpd_tls_eecdh_grade = strong
tls_eecdh_strong_curve = prime256v1
tls_eecdh_ultra_curve = secp384r1
tls_export_cipherlist = aNULL:-aNULL:ALL:+RC4:@STRENGTH
tls_high_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:!MEDIUM:+RC4:@STRENGTH
tls_low_cipherlist = aNULL:-aNULL:ALL:!EXPORT:+RC4:@STRENGTH
tls_medium_cipherlist = aNULL:-aNULL:ALL:!EXPORT:!LOW:+RC4:@STRENGTH
tls_null_cipherlist = eNULL:!aNULL
tls_preempt_cipherlist = no
tlsproxy_tls_eecdh_grade = $smtpd_tls_eecdh_grade
___________________________________________________

[root@testserver:~]$ openssl s_client -connect localhost:25 -starttls smtp -cipher kEECDH
CONNECTED(00000003)
depth=0 C = AT, ST = Vienna, L = Vienna, O = the lounge interactive design gmbh, OU = Administration, CN = *.testserver.rhsoft.net, emailAddress = hostmaster@thelounge.net
Comment 12 Scott Shambarger 2013-12-23 15:18:59 EST
I understand the cipherlist parameter quite well (that's why it's so carefully configured ;).  Resetting to default doesn't fix the issue.

Are you using the package for x86_64?  Run yum reinstall postfix and try again.

I rebuilt the rpm locally, and installed and postfix works correctly and supports EEC, however the package available via yum repos does not.

Eg. 
# yum reinstall postfix 
... downloads and installs postfix
# cd /usr/libexec/postfix
# ls -l smtpd
-rwxr-xr-x. 1 root root 622520 Oct 23 02:34 smtpd
# strings smtpd | grep EECDH
# (no output)

Installing local build (same release)
# yum reinstall ~devel/rpm/RPMS/x86_64/postfix-2.10.2-2.fc20.x86_64.rpm
...
# ls -l smtpd
-rwxr-xr-x. 1 root root 622616 Dec 23 11:40 smtpd
# strings smtpd | grep EECDH
Invalid TLS eecdh grade "%s": EECDH disabled                                    
unknown curve "%s": disabling EECDH support                                     
unable to use curve "%s": disabling EECDH support

# openssl s_client -connect localhost:25 -starttls smtp -cipher kEECDH
...
SSL-Session:                                                                    
    Protocol  : TLSv1.2                                                         
    Cipher    : ECDHE-RSA-AES256-GCM-SHA384                                     
...

Checked the yum cache, and my repo build was from http://mirrors.kernel.org/fedora/development/20/x86_64/os/Packages/p/postfix-2.10.2-2.fc20.x86_64.rpm

For ref, rpm -qip on it has:
Signature   : RSA/SHA256, Wed 23 Oct 2013 08:44:18 AM PDT, Key ID 2eb161fa24611\
0c1                                                                             
Build Date  : Wed 23 Oct 2013 02:34:40 AM PDT                                   
Build Host  : buildvm-14.phx2.fedoraproject.org
Comment 13 Harald Reindl 2013-12-23 15:28:39 EST
i build postfix without any special SSL params at my own so i do not understand what you mean with "Can you try building again with the correct library options" though i am not the fedora-maintainer
Comment 14 Scott Shambarger 2013-12-23 16:02:42 EST
Yes, but this bug was opened to request ECDHE builds of postfix.  The build available is not ECDHE enabled and so the bug should really be re-opened and new builds released.
Comment 15 Jaroslav Škarvada 2014-01-02 08:18:44 EST
I can confirm the current package in the repo doesn't support ECDHE, rebuilding again.
Comment 16 Fedora Update System 2014-01-02 08:58:58 EST
postfix-2.10.2-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/postfix-2.10.2-3.fc20
Comment 17 Fedora Update System 2014-01-03 03:40:24 EST
Package postfix-2.10.2-3.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing postfix-2.10.2-3.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0083/postfix-2.10.2-3.fc20
then log in and leave karma (feedback).
Comment 18 Scott Shambarger 2014-01-03 16:15:29 EST
Tested and new build does include ECDHE support.  Added karma.
Comment 19 Fedora Update System 2014-01-07 04:43:16 EST
postfix-2.10.2-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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