error:0A000126:SSL routines

Bug #1995690 reported by Rostislav
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
isync (Ubuntu)
Fix Released
Undecided
Sergio Durigan Junior
Jammy
Fix Released
Undecided
Sergio Durigan Junior
Kinetic
Fix Released
Undecided
Sergio Durigan Junior
Lunar
Fix Released
Undecided
Sergio Durigan Junior

Bug Description

[ Impact ]

Users who rely on isync/mbsync to fetch emails from certain IMAP servers may experience the following error after the synchronization finishes:

Socket error: secure read from imap.gmail.com ([2607:f8b0:4004:c06::6c]:993): error:0A000126:SSL routines::unexpected eof while reading

This does not happen with all email providers (only with those that fail to send a close notification before closing the TCP socket), but can be easily reproduced with Gmail and (apparently) Outlook.

[ Test Plan ]

One needs to have a Gmail/Outlook email account in order to reproduce this problem. The following ~/.mbsyncrc file should be adjusted accordingly, and is enough to reproduce the problem:

# cat ~/.mbsyncrc
Create Near

IMAPAccount gmail
Host imap.gmail.com
Port 993
User <email address hidden>
Pass YOUPASSWORD
SSLType IMAPS

IMAPStore gmail-remote
Account gmail

MaildirStore gmail-local
Path ~/Mail/gmail/
INBOX ~/Mail/gmail/INBOX
SubFolders Verbatim

Channel gmail
Far :gmail-remote:
Near :gmail-local:
Create Both

# mkdir -p ~/Mail/gmail
# mbsync -a

[ Where problems could occur ]

The upstream patch being backported isn't part of an official release yet; as such, the test coverage for it is reduced. The good news is that other distributions (Arch Linux, for example) have already backported the patch and released a version of their package with it.

The change is well contained and just handles the case when the expected EOF doesn't come. The software is now more flexible when it comes to accepting TLS connections that are not properly closed, but that should not affect the correct behaviour performed by other servers.

[ Original Description ]

I have been using isync with our corporate mail at outlook.office365.com.
After upgrade from 20.04 to 20.04 after every syncronisation mbsync produces a message

Socket error: secure read from outlook.office365.com (132.245.230.0:993): error:0A000126:SSL routines::unexpected eof while reading

The sync seems to work fine, so I do not know if this is a real error or just a
forgotten error message.. Any help would be appreciated. Thank you!

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the bug report.

This is also affecting me, and I believe it's actually a problem with openssl. I'm investigating and will post my results later.

Changed in isync (Ubuntu):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Changed in isync (Ubuntu Lunar):
status: New → In Progress
Changed in isync (Ubuntu Kinetic):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Changed in isync (Ubuntu Jammy):
assignee: nobody → Sergio Durigan Junior (sergiodj)
status: New → Triaged
Changed in isync (Ubuntu Kinetic):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package isync - 1.4.4-3ubuntu1

---------------
isync (1.4.4-3ubuntu1) lunar; urgency=medium

  * d/p/0001-work-around-unexpected-EOF-error-messages-at-end-of-.patch:
    Work around "unexpected EOF" error messages at end of SSL
    connections. (LP: #1995690)

 -- Sergio Durigan Junior <email address hidden> Wed, 16 Nov 2022 19:30:20 -0500

Changed in isync (Ubuntu Lunar):
status: In Progress → Fix Released
description: updated
Changed in isync (Ubuntu Jammy):
status: Triaged → In Progress
Changed in isync (Ubuntu Kinetic):
status: Triaged → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Rostislav, or anyone else affected,

Accepted isync into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/isync/1.4.4-3ubuntu0.22.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in isync (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Performing the verification for Kinetic.

First, verifying that we can reproduce the failure with the current version of isync.

# apt policy isync
isync:
  Installed: 1.4.4-3
  Candidate: 1.4.4-3
  Version table:
 *** 1.4.4-3 500
        500 http://archive.ubuntu.com/ubuntu kinetic/universe amd64 Packages
        100 /var/lib/dpkg/status

$ mbsync -a
C: 0/1 B: 0/1 F: +0/0 *0/0 #0/0 N: +0/0 *0/0 #0/0
Maildir notice: no UIDVALIDITY, creating new.
INBOX: 70 unread messages in excess of MaxMessages (1).
Please set ExpireUnread to decide outcome. Skipping mailbox.
C: 1/1 B: 1/1 F: +0/0 *0/0 #0/0 N: +0/0 *0/0 #0/0
Socket error: secure read from imap.gmail.com (142.251.163.108:993): error:0A000126:SSL routines::unexpected eof while reading

Now, updating the package and verifying that the fix works.

# apt policy isync
isync:
  Installed: 1.4.4-3ubuntu0.22.10.1
  Candidate: 1.4.4-3ubuntu0.22.10.1
  Version table:
 *** 1.4.4-3ubuntu0.22.10.1 500
        500 http://archive.ubuntu.com/ubuntu kinetic-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     1.4.4-3 500
        500 http://archive.ubuntu.com/ubuntu kinetic/universe amd64 Packages

$ mbsync -a
C: 0/1 B: 0/1 F: +0/0 *0/0 #0/0 N: +0/0 *0/0 #0/0
INBOX: 70 unread messages in excess of MaxMessages (1).
Please set ExpireUnread to decide outcome. Skipping mailbox.
C: 1/1 B: 1/1 F: +0/0 *0/0 #0/0 N: +0/0 *0/0 #0/0

This concludes the verification for Kinetic.

tags: added: verification-done verification-done-kinetic
removed: verification-needed verification-needed-kinetic
Revision history for this message
Rostislav (rostislav-kouznetsov) wrote :

Hi Sergio! Thank you very much for taking care of this. I use LTS, so can't easily test your fix to isync so far. Sorry. Looking forward seeing the fix available for 22.04.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote : Re: [Bug 1995690] Re: error:0A000126:SSL routines

On Wednesday, November 23 2022, Rostislav wrote:

> Hi Sergio! Thank you very much for taking care of this. I use LTS, so
> can't easily test your fix to isync so far. Sorry. Looking forward
> seeing the fix available for 22.04.

Hi Rostislav,

No problem! I'm waiting for the SRU team to accept the fix to Jammy,
and then we can test it.

Cheers,

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello Rostislav, or anyone else affected,

Accepted isync into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/isync/1.4.4-3ubuntu0.22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in isync (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
removed: verification-done
Revision history for this message
Rostislav (rostislav-kouznetsov) wrote :

Hi Andreas and Sergio!
I have got isync_1.4.4-3ubuntu0.22.04.1_amd64.deb. Seems to work fine. Thank you!

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you, Rostislav.

I can also confirm that the fix works for me.

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package isync - 1.4.4-3ubuntu0.22.10.1

---------------
isync (1.4.4-3ubuntu0.22.10.1) kinetic; urgency=medium

  * d/p/0001-work-around-unexpected-EOF-error-messages-at-end-of-.patch:
    Work around "unexpected EOF" error messages at end of SSL
    connections. (LP: #1995690)

 -- Sergio Durigan Junior <email address hidden> Thu, 17 Nov 2022 18:11:13 -0500

Changed in isync (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for isync has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package isync - 1.4.4-3ubuntu0.22.04.1

---------------
isync (1.4.4-3ubuntu0.22.04.1) jammy; urgency=medium

  * d/p/0001-work-around-unexpected-EOF-error-messages-at-end-of-.patch:
    Work around "unexpected EOF" error messages at end of SSL
    connections. (LP: #1995690)

 -- Sergio Durigan Junior <email address hidden> Wed, 16 Nov 2022 19:00:37 -0500

Changed in isync (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.