Bug 157521 - mutt segfaults when trying to connect to imap server
mutt segfaults when trying to connect to imap server
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mutt (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
: 171528 (view as bug list)
Depends On:
Blocks: FC4Target
  Show dependency treegraph
 
Reported: 2005-05-12 05:31 EDT by Sarantis Paskalis
Modified: 2014-03-16 22:53 EDT (History)
10 users (show)

See Also:
Fixed In Version: 1.4.2.1-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-24 22:18:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
mutt backtrace (1.09 KB, application/octet-stream)
2005-05-13 04:22 EDT, Sarantis Paskalis
no flags Details
backtrace with cyrus-sasl-debuginfo installed (1.43 KB, text/plain)
2005-05-13 04:26 EDT, Sarantis Paskalis
no flags Details
output of "openssl s_client -showcerts -connect cnl.di.uoa.gr:imaps" (3.44 KB, text/plain)
2005-05-21 04:20 EDT, Sarantis Paskalis
no flags Details
full output of openssl commandline with "0001 LOGOUT" issued (3.54 KB, text/plain)
2005-05-21 04:23 EDT, Sarantis Paskalis
no flags Details
coredump of the procedure (1012.00 KB, application/octet-stream)
2005-05-27 06:53 EDT, Sarantis Paskalis
no flags Details
backtrace, cyrus imapd / gssapi (1.06 KB, text/plain)
2005-06-28 16:08 EDT, Need Real Name
no flags Details
Fix, from the mutt devel tree (1.68 KB, patch)
2005-10-24 22:16 EDT, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Sarantis Paskalis 2005-05-12 05:31:33 EDT
Description of problem:
mutt segfaults when trying to connect to a remote IMAP server.  Note that this
does not always happen, but when it does it seems repeatable.  The certificate
is also expired, but the only impact was that I had to always accept the
certificate.  Remote server runs RH 7.0 and the relevant imap service through
xinetd.

The series of messages is:

In the main screen-> 
   This certificate belongs to:
      xxxxxxxxxxxxxxx

   This certificate was issued by:
      xxxxxxxxxxxxxxx

   This certificate is valid
      from Aug 26 06:41:41 2002 GMT
        to Aug 26 06:41:41 2003 GMT

   Fingerprint: 1FE6 7164 31B7 84AE 2055 A9D6 35D5 4F90

In the status bar->  Mutt: SSL Certificate check
Below the status bar (in the following order)->
(r)eject, accept (o)nce, (a)ccept always
Certificate saved
SSL connection using TLSv1/SSLv3 (DES-CBC3-SHA)

Segmentation fault

After that sequence it used to ask for my password.


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

How reproducible:
Sometimes, but if it occurs, it seems repeatable (i.e. it always crashes
afterwards).  I haven't observed a pattern.

Steps to Reproduce:
1. start mutt
2. try to connect to remote imap server
3. mutt segfaults in checking the SSL certificate.
  
Actual results:


Expected results:


Additional info: System was a FC3 box upgraded to rawhide through yum.
Comment 1 Bill Nottingham 2005-05-12 14:09:04 EDT
Can you install the debuginfo and get a backtrace?
Comment 2 Sarantis Paskalis 2005-05-13 04:22:24 EDT
Created attachment 114325 [details]
mutt backtrace

Attached a backtrace with mutt debuginfo installed.
Comment 3 Sarantis Paskalis 2005-05-13 04:26:43 EDT
Created attachment 114326 [details]
backtrace with cyrus-sasl-debuginfo installed

I noticed that the last function is called from /usr/lib/libsasl2.so.2, which
belongs to cyrus-sasl, so I also installed the cyrus-sasl-debuginfo rpm. 
Attached the (slightly) different backtrace.
Comment 4 Nalin Dahyabhai 2005-05-20 18:52:22 EDT
I can't reproduce this here with the same version of mutt pointed to a local
imaps server.  Can you connect to the server by running:
   openssl s_client -showcerts -connect SERVERNAME:imaps
issuing a "0001 LOGOUT" command, and attaching the output?  It shouldn't contain
anything sensitive (the certificate is by definition just the server's public
key), but it may shed some light on whether or not there's something specific
about the certificate which is causing mutt to segfault.
Comment 5 Sarantis Paskalis 2005-05-21 04:20:31 EDT
Created attachment 114663 [details]
output of "openssl s_client -showcerts -connect cnl.di.uoa.gr:imaps"

Attached output of the command.  

I should note again that it does not segfault reliably, and that it only
exhibits the breakage behavior with the specific imap server (connecting to
another imap server seems just fine).
Comment 6 Sarantis Paskalis 2005-05-21 04:23:29 EDT
Created attachment 114664 [details]
full output of openssl commandline with "0001 LOGOUT" issued
Comment 7 Sarantis Paskalis 2005-05-27 06:53:45 EDT
Created attachment 114902 [details]
coredump of the procedure
Comment 8 Markus Wigge 2005-06-15 04:57:50 EDT
Here we have the same problem on different hosts and it is reproducable.
Always when I try to connect to a remote IMAP-Server using
"mutt -f imap://<user>@host/INBOX"
I get asked if I accept the certificate and if I do so mutt segfaults.
Comment 9 Albert Strasheim 2005-06-15 20:05:44 EDT
Same problem when one has the following line ~/.muttrc:

set spoolfile=imap://albert@192.168.1.1/

This worked with mutt-1.4.1-10 in Fedora Core 3.
Comment 10 Bill Nottingham 2005-06-16 13:48:19 EDT
Albert/Markus - do you get the same backtrace?
Comment 11 Albert Strasheim 2005-06-16 17:13:27 EDT
I just tested again and now imap:// and imaps:// works. Strange. So somehow the
bug might be related to the IMAP server. I am running dovecot-0.99.14-4.fc4. I
also upgraded from FC3 -> FC4 (as opposed to a clean install). 

It is possible that I have rebooted or that I have restarted dovecot since
reporting this problem.

I noticed some changes in /etc/doveconf.conf between FC3 and FC4, specifically
these lines changed (FC4 version shown below):

ssl_cert_file = /etc/pki/dovecot/dovecot.pem
ssl_key_file = /etc/pki/dovecot/private/dovecot.pem
Comment 12 Albert Strasheim 2005-06-16 18:01:14 EDT
Cancel that. After having IMAP work for a while, it's segfaulting again now. I
haven't restarted dovecot or anything like that. I'll install the debug symbols
and see what is to be seen.
Comment 13 Albert Strasheim 2005-06-16 18:08:16 EDT
Same backtrace for me. In three consecutive runs under GDB it worked twice and
then failed.
Comment 14 Need Real Name 2005-06-28 16:04:52 EDT
Very similar backtrace for same mutt error for me, with the difference that I'm
talking to a cyrus imap server and using gssapi for authentication. The odd
thing is that I have one FC4 system where it segfaults every time, and another
where it segfaults maybe one in ten tries. Both were installed using the same
kickstart, so I'm baffled. I'll attach my stack trace if it helps.
Comment 15 Need Real Name 2005-06-28 16:08:34 EDT
Created attachment 116085 [details]
backtrace, cyrus imapd / gssapi
Comment 16 Markus Wigge 2005-07-15 03:06:19 EDT
Hi,
after I tested it again right now mutt works when I use "mutt -f imaps://", but
"mutt -f imap://" with the same host segfaults!
Seems to me that it can't handle "SSL" while the URI says "imap://".

Last time I checked it both URIs segfaulted.
Comment 17 Bill Nottingham 2005-10-24 16:24:12 EDT
*** Bug 171528 has been marked as a duplicate of this bug. ***
Comment 18 Need Real Name 2005-10-24 17:16:31 EDT
This seems to be fixed in mutt-1.4.2.1-3 from fedora development.
Comment 19 Kaj J. Niemi 2005-10-24 17:19:50 EDT
It's not, see #171528...
Comment 20 Need Real Name 2005-10-24 17:31:06 EDT
Correction: GSSAPI seems to be fixed in mutt-1.4.2.1-3
Comment 21 Bill Nottingham 2005-10-24 22:16:25 EDT
Created attachment 120334 [details]
Fix, from the mutt devel tree

Here's the fix.
Comment 22 Kenn Humborg 2005-10-25 03:30:38 EDT
Are there any plans to release this as an FC4 update?

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