exim4 GnuTLS breakage with outgoing TLS 1.3 "Resource temporarily unavailable"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
exim |
Fix Released
|
Unknown
|
|||
exim4 (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Won't Fix
|
Undecided
|
Unassigned | ||
Xenial |
Won't Fix
|
Undecided
|
Unassigned | ||
Bionic |
Incomplete
|
Undecided
|
Bryce Harrington |
Bug Description
Very recently, my (unchanged for years) bionic exim4 flow ( outgoing SMTP -> smtp.canonical.com ) abruptly stopped working, with exim4 log as follows:
SMTP<< 220 smtp-relay-
SMTP>> EHLO myhostname
SMTP<< 250-smtp-
250-SIZE 61440000
250-VRFY
250-ETRN
250-DSN
250 CHUNKING
SMTP>> STARTTLS
SMTP<< 220 2.0.0 Ready to start TLS
SMTP>> EHLO myhostname
H=smtp.
SMTP(close)>>
H=smtp.
This appears to be a manifestation of this exim4 bug which was fixed in exim4 (4.92): https:/
See also: https://<email address hidden>
I found and installed a PPA version of exim4 (4.94) for bionic, which did fix the problem for me.
I believe that all Ubuntu versions which supply exim4 < 4.92 {Bionic, Xenial, Trusty} are affected by this bug, which leaves exim4 mysteriously broken when the server side happens to move to TLS 1.3.
I suggest updating exim4 on the affected Ubuntu versions.
Related branches
- git-ubuntu bot: Approve
- Athos Ribeiro (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 71 lines (+49/-0)3 files modifieddebian/changelog (+10/-0)
debian/patches/fix-coding-typo.patch (+38/-0)
debian/patches/series (+1/-0)
tags: | added: server-todo |
Changed in exim4 (Ubuntu Bionic): | |
assignee: | nobody → Bryce Harrington (bryce) |
Changed in exim: | |
status: | Unknown → Fix Released |
tags: | removed: server-todo |
Changed in exim4 (Ubuntu Bionic): | |
status: | Incomplete → New |
status: | New → Incomplete |
[jgh: edited to hide identifying info]
Created attachment 1160 [details]
First shot at a fix.
Hello,
exim (4.92 rc2) built against gnutls >= 3.6.5 supports TLS 1.3. However while incoming connections seem to work, outgoing TLS 1.3 is totally broken, mails are stuck in the queue. ------- ------- - ECDHE_RSA_ AES_256_ GCM_SHA384: 256 0x7ffe02af0cd0, 22) record_ send(SSL, 0x7ffe02af0cd0, 22) record_ recv(0x559451c5 fe30, 0x7ffe02aefcd0, 4096) buffers. c[get_last_ packet] :1171 buffers. c[_gnutls_ handshake_ io_recv_ int]:1431 record. c[_gnutls_ recv_in_ buffers] :1560 record. c[_gnutls_ recv_int] :1759 buffers. c[_gnutls_ io_write_ flush]: 696 ------- ------- -
-------
16:09:51 23494 cipher: TLS1.3:
16:09:51 23494 Have channel bindings cached for possible auth usage.
16:09:51 23494 SMTP>> EHLO <elided>
16:09:51 23494 cmd buf flush 22 bytes
16:09:51 23494 tls_write(
16:09:51 23494 gnutls_
16:09:51 23494 outbytes=22
16:09:51 23494 Calling gnutls_
16:09:51 23494 GnuTLS<3>: ASSERT: ../../lib/
16:09:51 23494 GnuTLS<3>: ASSERT: ../../lib/
16:09:51 23494 GnuTLS<3>: ASSERT: ../../lib/
16:09:51 23494 GnuTLS<3>: ASSERT: ../../lib/
16:09:51 23494 tls_read: err from gnutls_record_recv(
16:09:51 23494 LOG: MAIN
16:09:51 23494 H=<elided> [<elided>] TLS error on connection (recv): Resource temporarily unavailable, try again.
16:09:51 23494 SMTP(No such file or directory)<<
16:09:51 23494 tls_close(): shutting down TLS
16:09:51 23494 GnuTLS<3>: ASSERT: ../../lib/
16:09:51 23494 SMTP(close)>>
16:09:51 23494 LOG: MAIN
-------
(Thanks, Jeremy Harris, for help with this and providing a test server to connect to.)
The error seems to be caused by exim regarding gnutls_ record_ recv() returning a /gitlab. com/gnutls/ gnutls/ issues/ 644#note_ 123363338
value <0 as a fatal error, while GNUTLS_E_AGAIN will happen in a normal TLS1.3 connection, due to the changed handshake.
See https:/
Attached patch seems to work for, Jeremy said he had tested something similarily, so we better use his version.