Bug 1838187

Summary: 0017352: GnuTLS error: Internal error in memory allocation.
Product: Red Hat Enterprise Linux 7 Reporter: James Szinger <jszinger>
Component: gnutlsAssignee: Daiki Ueno <dueno>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.8CC: hazy_l
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-02 13:58:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Szinger 2020-05-20 15:35:00 UTC
Description of problem:
GnuTLS can't establish a connection; dies with cryptic error.

Version-Release number of selected component (if applicable):
CentOS 7.8.2003
gnutls-3.3.29-9.el7_6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. gnutls-cli -p 993 imap.mail.yahoo.com

Actual results:
Processed 154 CA certificate(s).
Resolving 'imap.mail.yahoo.com'...
Connecting to '98.137.159.41:993'...
- Certificate type: X.509
- Got a certificate list of 2 certificates.
- Certificate[0] info:
 - subject `C=US,ST=California,L=Sunnyvale,O=Oath Inc,CN=*.imap.mail.yahoo.com', issuer `C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA', RSA key 2048 bits, signed using RSA-SHA256, activated `2020-02-01 00:00:00 UTC', expires `2020-07-30 12:00:00 UTC', SHA-1 fingerprint `f8047f0f60c4641f718353be7ddc31665b96b5c0'
	Public Key ID:
		ad5973ba0fac1faa34d80fc06b1eca7038331f8b
	Public key's random art:
		+--[ RSA 2048]----+
		|                 |
		|                 |
		|                 |
		|   .     .       |
		|    o   S + .    |
		| .   =   = +     |
		|* o = = o =      |
		| X * o + o +     |
		|E = . ..+.o..    |
		+-----------------+

- Certificate[1] info:
 - subject `C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA', issuer `C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance EV Root CA', RSA key 2048 bits, signed using RSA-SHA256, activated `2013-10-22 12:00:00 UTC', expires `2028-10-22 12:00:00 UTC', SHA-1 fingerprint `a031c46782e6e6c662c2c87c76da9aa62ccabd8e'
- Status: The certificate is trusted. 
- Successfully sent 0 certificate(s) to server.
*** Fatal error: Internal error in memory allocation.
*** Handshake has failed
GnuTLS error: Internal error in memory allocation.


Expected results:
A working SSL connection.  (Or at least a sane error message)


Additional info:
The same command works on Fedora 31 and 32.

`openssl s_client -connect imap.mail.yahoo.com:993` succeeds on CentOS 7.

Comment 2 Daiki Ueno 2020-05-26 13:53:30 UTC
This looks like the same issue as https://gitlab.com/gnutls/gnutls/-/issues/997.
For some reason the server sends an empty session ticket in TLS 1.2.

Comment 3 James Szinger 2020-05-26 14:48:59 UTC
I confirm the same error with gnutls-cli 3.5.18 on Ubuntu 18.04.

I can get a working connection on CentOS and Ubuntu with `gnutls-cli --disable-extensions -p 995 pop.verizon.net`. I also get a connection  on Ubuntu with `gnutls-cli --priority 'NORMAL:%NO_TICKETS' -p 993 imap.mail.yahoo.com`, but that produces 'Syntax error at: %NO_TICKETS' on CentOS.

Comment 4 Daiki Ueno 2020-06-02 13:58:17 UTC
Thank you for the bug report. While this bug is reported against RHEL-7.8, RHEL-7 is already in the Maintenance Support Phase 1, which means only qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released. If this bug is qualified for the Maintenance Support 1 Phase, please reopen; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8.

Comment 5 hazy_l@yahoo.com 2020-06-11 03:33:01 UTC
People are unable to read their email due to this bug. From any practical point of view, that qualifies as a critical bug. Please incorporate the gnutls fix in RHEL-7 updates. Me for one, I use CentOS which has a much longer lifespan than RHEL, but it relies un RHEL packages and fixes.

Comment 6 hazy_l@yahoo.com 2020-06-11 17:09:59 UTC
By the way, the bug is affecting Evolution email client, which is an important piece of software.