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 2004915 - openssl occasionally sends internal error to gnutls when using FFDHE
Summary: openssl occasionally sends internal error to gnutls when using FFDHE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openssl
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Clemens Lang
QA Contact: Alexander Sosedkin
Jan Fiala
URL:
Whiteboard:
Depends On:
Blocks: 2080323
TreeView+ depends on / blocked
 
Reported: 2021-09-16 12:42 UTC by Alexander Sosedkin
Modified: 2024-04-03 02:07 UTC (History)
7 users (show)

Fixed In Version: openssl-3.0.1-21.el9
Doc Type: Bug Fix
Doc Text:
.OpenSSL no longer fails to connect when FFDHE is used Previously, TLS connections that use the finite-field-based Diffie-Hellman ephemeral (FFDHE) key exchange mechanism sometimes failed when processing FFDHE key shares from a client. This was caused by overly restrictive checks in OpenSSL. As a consequence, the OpenSSL server aborted the connection with an `internal_error` alert. With this update, OpenSSL accepts smaller but still compliant client key shares. As a result, connections between OpenSSL and other implementations no longer randomly abort when using FFDHE key exchanges.
Clone Of:
: 2080323 (view as bug list)
Environment:
Last Closed: 2023-06-05 16:09:39 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
standalone reproducer (675 bytes, application/x-shellscript)
2021-09-16 12:46 UTC, Alexander Sosedkin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openssl/openssl/commit/2c0f7d46b8449423446cfe1e52fc1e1ecd506b62 0 None None None 2022-03-11 12:13:30 UTC
Github openssl openssl pull 17859 0 None open DH: Make padding always on when X9.42 KDF is used 2022-03-11 12:13:30 UTC
Red Hat Issue Tracker CRYPTO-6434 0 None None None 2022-03-11 16:36:31 UTC
Red Hat Issue Tracker RHELPLAN-97533 0 None None None 2021-09-18 10:15:42 UTC

Description Alexander Sosedkin 2021-09-16 12:42:50 UTC
Description of problem: openssl occasionally sends internal error to gnutls when using FFDHE 
Version-Release number of selected component (if applicable): openssl-3.0.0-1.el9
How reproducible: rarely, but 1000 iterations is usually enough to trigger it

Steps to Reproduce (see attached reproducer for more detailed steps):
1. openssl req -x509 -newkey rsa -keyout k.key -out c.crt -subj /CN=localhost -nodes -batch
2. openssl s_server -no_tls1_3 -cipher DHE-RSA-AES256-SHA -debug -key k.key -cert c.crt -www
3. (many times) GNUTLS_DEBUG_LEVEL=9 wget --debug -O- --no-check-certificate https://localhost:4433

Expected results: connection succeeds
Actual results:
    (client)
    gnutls[4]: HSK[0x55a923e02f80]: SERVER KEY EXCHANGE (12) was received. Length 779[779], frag offset 0, frag length: 779, sequence: 0
    gnutls[1]: FFDHE groups advertised, but server didn't support it; falling back to server's choice
    ...
    gnutls[4]: HSK[0x55a923e02f80]: CLIENT KEY EXCHANGE was queued [261 bytes]
    ...
    gnutls[4]: HSK[0x55a923e02f80]: Cipher Suite: GNUTLS_DHE_RSA_AES_256_CBC_SHA1
    ...
    gnutls[5]: REC[0x55a923e02f80]: SSL 3.3 Alert packet received. Epoch 0, length: 2
    gnutls[5]: REC[0x55a923e02f80]: Expected Packet Handshake(22)
    gnutls[5]: REC[0x55a923e02f80]: Received Packet Alert(21) with length: 2
    gnutls[5]: REC[0x55a923e02f80]: Decrypted Packet[4] Alert(21) with length: 2
    gnutls[5]: REC[0x55a923e02f80]: Alert[2|80] - Internal error - was received
    ...
    GnuTLS: received alert [80]: Internal error
    ...
    Unable to establish SSL connection.

    (server)
    error:02800066:Diffie-Hellman routines:ossl_dh_buf2key:invalid public key:crypto/dh/dh_key.c:399:
    80EB5D81397F0000:error:0A0C0103:SSL routines:tls_process_cke_dhe:internal error:ssl/statem/statem_srvr.c:2989:

Comment 2 Alexander Sosedkin 2021-09-16 12:46:00 UTC
Created attachment 1823560 [details]
standalone reproducer

Comment 25 Clemens Lang 2023-06-05 16:09:39 UTC
RHEL 9.1 contains openssl-3.0.1-43.el9_0.


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