Bug 1397365 - NSS session resumption using session ID does not work for DHE-DSS ciphersuites [rhel7]
Summary: NSS session resumption using session ID does not work for DHE-DSS ciphersuite...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Daiki Ueno
QA Contact: Hubert Kario
URL:
Whiteboard:
: 1461504 (view as bug list)
Depends On:
Blocks: 1420851 1671095 1397478 1461504
TreeView+ depends on / blocked
 
Reported: 2016-11-22 11:58 UTC by Frantisek Sumsal
Modified: 2019-02-11 15:41 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1397478 1671095 (view as bug list)
Environment:
Last Closed: 2019-02-11 15:41:17 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Mozilla Foundation 1174677 -- NEW Fix session resumption and session tickets when using DHE_DSS ciphersuites 2020-02-04 08:37:44 UTC
Red Hat Bugzilla 1397472 'low' 'CLOSED' 'strsclnt gets stuck during session resumption when using client certificates [rhel-7]' 2019-12-05 13:31:53 UTC

Internal Links: 1397472

Description Frantisek Sumsal 2016-11-22 11:58:05 UTC
Description of problem:
When NSS acts as a server, session resumption using session ID does not work for ciphersuites using DHE-DSS algorithm. Even though this behavior is expected for the ticket based resumption, the session ID resumption should work.

Version-Release number of selected component (if applicable):
nss-3.21.0-17.el7.x86_64

How reproducible:
always

Steps to Reproduce:
# NSS_CIPHER="0032"
# OPENSSL_CIPHER="DHE-DSS-AES128-SHA"
# openssl dsaparam 2048 < /dev/random > dsaparam.pem
# openssl req -x509 -newkey dsa:dsaparam.pem -keyout dsa-key.pem -out dsa-cert.pem -days 3650 -subj "/CN=localhost" -nodes
# openssl pkcs12 -name dsa -export -inkey dsa-key.pem -out dsa-key.p12 -in dsa-cert.pem -passout "pass:"
# mkdir nssdb
# certutil -N --empty-password -d sql:./nssdb
# certutil -A -d sql:./nssdb/ -n dsa -t ',,' -a -i dsa-cert.pem
# pk12util -i dsa-key.p12 -d sql:./nssdb -W ''
# /usr/lib64/nss/unsupported-tools/selfserv -d sql:./nssdb/ -p 4433 -V tls1.0: -H 1 -S dsa -c :$NSS_CIPHER -u &
# sleep 3
# openssl s_client -connect localhost:4433 -CAfile dsa-cert.pem -cipher $OPENSSL_CIPHER -no_ticket -sess_out sess.pem > full.log < /dev/null
# grep "New, TLSv1/SSLv3" full.log || echo "ERROR: HANDSHAKE ERROR"
# openssl s_client -connect localhost:4433 -CAfile dsa-cert.pem -cipher $OPENSSL_CIPHER -no_ticket -sess_in sess.pem > resumption.log < /dev/null
# grep "Reused, TLSv1/SSLv3" resumption.log || echo "ERROR: RESUMPTION EXPECTED"

Actual results:
# openssl s_client -connect localhost:4433 -CAfile dsa-cert.pem -cipher $OPENSSL_CIPHER -no_ticket -sess_out sess.pem > full.log < /dev/null
depth=0 CN = localhost
verify return:1
DONE
# grep "New, TLSv1/SSLv3" full.log || echo "ERROR: HANDSHAKE ERROR"
New, TLSv1/SSLv3, Cipher is DHE-DSS-AES128-SHA
# openssl s_client -connect localhost:4433 -CAfile dsa-cert.pem -cipher $OPENSSL_CIPHER -no_ticket -sess_in sess.pem > resumption.log < /dev/null
depth=0 CN = localhost
verify return:1
DONE
# grep "Reused, TLSv1/SSLv3" resumption.log || echo "ERROR: RESUMPTION EXPECTED"
ERROR: RESUMPTION EXPECTED
# cat full.log
<...snip...>
SSL handshake has read 1896 bytes and written 437 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-DSS-AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
<...snip...>

Expected results:
The session should be resumed:
# NSS_CIPHER="003D"
# OPENSSL_CIPHER="AES256-SHA256"
<...snip...>
# /usr/lib64/nss/unsupported-tools/selfserv -d sql:./nssdb/ -p 4433 -V tls1.0: -H 1 -n rsa -c :$NSS_CIPHER -u &
# openssl s_client -connect localhost:4433 -CAfile rsa-cert.pem -cipher $OPENSSL_CIPHER -no_ticket -sess_out sess.pem > full.log < /dev/null
depth=0 CN = localhost
verify return:1
DONE
# grep "New, TLSv1/SSLv3" full.log || echo "ERROR: HANDSHAKE ERROR"
New, TLSv1/SSLv3, Cipher is AES256-SHA256
# openssl s_client -connect localhost:4433 -CAfile rsa-cert.pem -cipher $OPENSSL_CIPHER -no_ticket -sess_in sess.pem > resumption.log < /dev/null
DONE
# grep "Reused, TLSv1/SSLv3" resumption.log || echo "ERROR: RESUMPTION EXPECTED"
Reused, TLSv1/SSLv3, Cipher is AES256-SHA256

Additional info:
Problematic ciphersuites (openssl/nss):
DHE-DSS-AES128-SHA/0032
DHE-DSS-AES256-SHA256/006A
DHE-DSS-AES128-GCM-SHA256/00A2
DHE-DSS-AES256-GCM-SHA384/00A3

Comment 2 Kai Engert (:kaie) (inactive account) 2017-02-09 10:34:02 UTC
Frantisek: Hubert thinks this might work correctly with newer NSS.

Could you please test it with newer NSS, the one we intend to use for RHEL 7.4.0? Currently that's NSS 3.28.2

Comment 3 Frantisek Sumsal 2017-02-09 13:54:47 UTC
I've compiled and tried several versions[0] to no avail - the session resumption still fails both with session IDs and with tickets.

[0]
master (default) branch (3.30)
branch NSS_3_28_BRANCH
tag NSS_3_28_2_RTM

Comment 6 Hubert Kario 2017-06-16 10:11:14 UTC
*** Bug 1461504 has been marked as a duplicate of this bug. ***

Comment 11 Nikos Mavrogiannopoulos 2017-08-02 09:15:42 UTC
Dropping from RHEL7.5 crypto bugs tracker as it is was associated with the customer case.

Comment 12 Stanislav Zidek 2017-08-04 12:38:09 UTC
Restoring original priority and severity.

Comment 20 Simo Sorce 2019-02-11 15:41:17 UTC
This issue was not selected to be included either in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small amount of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.


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