RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1328205 - gnutls-cli won't send certificates that don't match hashes in Certificate Request
Summary: gnutls-cli won't send certificates that don't match hashes in Certificate Req...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gnutls
Version: 6.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Nikos Mavrogiannopoulos
QA Contact: Alicja Kario
URL:
Whiteboard:
Depends On:
Blocks: 1339222 1343211
TreeView+ depends on / blocked
 
Reported: 2016-04-18 17:38 UTC by Alicja Kario
Modified: 2017-03-21 09:03 UTC (History)
1 user (show)

Fixed In Version: gnutls-2.12.23-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 09:03:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0574 0 normal SHIPPED_LIVE Moderate: gnutls security, bug fix, and enhancement update 2017-03-21 12:23:04 UTC

Description Alicja Kario 2016-04-18 17:38:19 UTC
Description of problem:
If the server is asking for just some hashes in the Certificate Request message, client will not try sending the Certificate anyway. Moreover, if the certificate is signed with a strong hash (e.g. SHA-512), the connection is not successful even if server is asking for SHA-512.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. Start a server asking for just sha-384 signatures in Certificate Request
2. Try connecting to it using gnutls-cli with a sha-256 signed certificate

1. Start a server asking for just sha-512 signatures in Certificate Request
2. Try connecting to it using gnutls-cli with a sha-512 signed certificate

Actual results:
- Could not find a suitable certificate to send to server
*** Fatal error: GnuTLS internal error.

in sha-512 case:
*** Fatal error: The signature algorithm is not supported.

Expected results:
- Handshake was completed

Additional info:
While the behaviour in which the client doesn't sent certificates not matching signatures requested by server matches the RFC 5246, the general consensus of the IETF TLS WG is that this was not a good idea. This requirement was ultimately removed in TLSv1.3. Moreover, it is not exhibited by newer GnuTLS (on RHEL-7 or Fedora 22).

Comment 1 Nikos Mavrogiannopoulos 2016-05-26 07:39:52 UTC
This bug is tricky to be solved and most probably won't. If I remember correctly, versions of TLS prior to 1.2 could use a running hash (e.g., SHA1) throughout the handshake, and will use the output of this hash for any signatures that need to be generated. Starting with TLS 1.2 the hash is negotiated, but a client will not know the hash to be used for client-cert signatures up until the point the server asks for one. At this point this gnutls client has two hashes running sha1 + sha256. Thus if the server asks for anything else it wouldn't work.

As such the preferred action is to mark the gnutls client as capable of handling sha1+sha256 hashes only, and treat it as a known bug.
(Note that it doesn't make sense for the client to restrict its supported signature hashes to sha1+sha256 only, because the client can handle more signature hashes when the signature come from the server side).

Comment 2 RHEL Program Management 2016-05-26 08:25:55 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 3 Alicja Kario 2016-05-26 10:16:31 UTC
(In reply to Nikos Mavrogiannopoulos from comment #1)
> This bug is tricky to be solved and most probably won't. If I remember
> correctly, versions of TLS prior to 1.2 could use a running hash (e.g.,
> SHA1) throughout the handshake, and will use the output of this hash for any
> signatures that need to be generated. Starting with TLS 1.2 the hash is
> negotiated, but a client will not know the hash to be used for client-cert
> signatures up until the point the server asks for one. At this point this
> gnutls client has two hashes running sha1 + sha256. Thus if the server asks
> for anything else it wouldn't work.
> 
> As such the preferred action is to mark the gnutls client as capable of
> handling sha1+sha256 hashes only, and treat it as a known bug.
> (Note that it doesn't make sense for the client to restrict its supported
> signature hashes to sha1+sha256 only, because the client can handle more
> signature hashes when the signature come from the server side).

Then it means that it's the exact same bug as the one we have in NSS, bug 1238369, with the same interoperability issues: Windows clients with certificates signed with anything but SHA-256 or SHA-1 will not work.

Comment 4 Nikos Mavrogiannopoulos 2016-05-26 10:18:35 UTC
Given the scope of this change, rsyslog (or cups), and the fact that there is no web server using gnutls in rhel, I don't that this is any serious limitation.

Comment 5 Alicja Kario 2016-05-27 13:53:26 UTC
If we don't add support for SHA-384 and SHA-512 signatures in Certificate Verify, the second issue still remains:

> - Could not find a suitable certificate to send to server
> *** Fatal error: GnuTLS internal error.

In other words, if client has only certificate signed with SHA-384 and the server is asking only for SHA-256 or SHA-1 signatures, it should still send the certificate to server but sign the Certificate Verify with SHA-256.

Comment 6 Nikos Mavrogiannopoulos 2016-05-27 13:57:08 UTC
That restricted scope can be addressed in RHEL-6.9. Adding high priority.

Comment 11 errata-xmlrpc 2017-03-21 09:03:47 UTC
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/RHSA-2017-0574.html


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