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 750929 - SIGSEGV Crash while parsing certificates file
Summary: SIGSEGV Crash while parsing certificates file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mutt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: jpacner
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks: 751124 947782 1021464
TreeView+ depends on / blocked
 
Reported: 2011-11-02 20:55 UTC by Matěj Cepl
Modified: 2014-07-28 09:01 UTC (History)
3 users (show)

Fixed In Version: mutt-1.5.20-6.20091214hg736b6a.el6
Doc Type: Bug Fix
Doc Text:
Prior to this update, mutt did not correctly parse certificate files when accessing accounts through IMAP and POP3 protocols. Consequently, mutt terminated unexpectedly with a segmentation fault when attempting to access an IMAP or POP3 account. This update fixes the parsing process and accessing an IMAP or POP3 account now functions as intended.
Clone Of:
: 751124 1021464 (view as bug list)
Environment:
Last Closed: 2014-07-28 09:01:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed patch to parse certificates file securely (876 bytes, patch)
2013-06-27 11:47 UTC, Honza Horak
no flags Details | Diff
patch to parse certificates file securely (639 bytes, patch)
2013-10-21 10:36 UTC, Honza Horak
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0945 0 normal SHIPPED_LIVE mutt bug fix update 2014-07-28 13:00:56 UTC

Description Matěj Cepl 2011-11-02 20:55:03 UTC
Description of problem:
I have set

set folder=imaps://matej.cz/INBOX

and when starting mutt, I get this crash:

Program received signal SIGSEGV, Segmentation fault.
__strstr_sse2 (haystack_start=0x1 <Address 0x1 out of bounds>, 
    needle_start=0x4a8248 "-----BEGIN") at ../string/strstr.c:63
63	  while (*haystack && *needle)
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-7.el6_0.x86_64 keyutils-libs-1.4-3.el6.x86_64 libgcrypt-1.4.5-9.el6.x86_64 libgpg-error-1.7-4.el6.x86_64 libtasn1-2.3-3.el6.x86_64 nss-softokn-freebl-3.12.9-10.el6.x86_64 zlib-1.2.3-27.el6.x86_64
(gdb) thread apply all backtrace

Thread 1 (Thread 0x7ffff7fd67c0 (LWP 24792)):
#0  __strstr_sse2 (haystack_start=0x1 <Address 0x1 out of bounds>, 
    needle_start=0x4a8248 "-----BEGIN") at ../string/strstr.c:63
#1  0x000000000048798b in tls_compare_certificates (certdata=0xb9b8f0, certstat=0, 
    hostname=<value optimized out>, chainidx=0, certerr=0x7fffffffca18, savedcert=0x7fffffffca14)
    at mutt_ssl_gnutls.c:438
#2  tls_check_preauth (certdata=0xb9b8f0, certstat=0, hostname=<value optimized out>, 
    chainidx=0, certerr=0x7fffffffca18, savedcert=0x7fffffffca14) at mutt_ssl_gnutls.c:590
#3  0x0000000000489131 in tls_check_certificate (conn=0xb7d950) at mutt_ssl_gnutls.c:1005
#4  tls_negotiate (conn=0xb7d950) at mutt_ssl_gnutls.c:346
#5  0x000000000048950c in tls_socket_open (conn=0xb7d950) at mutt_ssl_gnutls.c:162
#6  0x0000000000490a27 in imap_open_connection (idata=0xb7def0) at imap.c:407
#7  0x0000000000490d68 in imap_conn_find (account=0x7fffffffd860, flags=<value optimized out>)
    at imap.c:371
#8  0x00000000004924af in imap_open_mailbox (ctx=0xb7c650) at imap.c:574
#9  0x0000000000443be5 in mx_open_mailbox (path=<value optimized out>, flags=0, pctx=0x0)
    at mx.c:661
#10 0x0000000000439aa6 in main (argc=1, argv=<value optimized out>) at main.c:1017
(gdb) 

Version-Release number of selected component (if applicable):
mutt-1.5.20-2.20091214hg736b6a.el6_1.1.x86_64

How reproducible:
100% (three out of three attempts, also with attempt to access POP3 account)

Steps to Reproduce:
1.try to access IMAP or POP3 account
2.
3.
  
Actual results:
crash

Expected results:
opened mailbox

Additional info:

Comment 2 RHEL Program Management 2011-11-02 21:28:53 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 15 Honza Horak 2013-06-27 11:47:48 UTC
Created attachment 766073 [details]
proposed patch to parse certificates file securely

The previous patch contained off-by-one error, this one seems to work fine for some time in Fedora.

Comment 18 Honza Horak 2013-10-21 10:36:03 UTC
Created attachment 814524 [details]
patch to parse certificates file securely

Upstream fixed this issue a bit differently, this is upstream's patch.

Comment 22 jpacner 2014-05-16 12:34:53 UTC
Fixed in commit http://pkgs.devel.redhat.com/cgit/rpms/mutt/commit/?h=rhel-6.6&id=d5f692c7abf9d2ab32558e21f10c45ba7844def9 (build mutt-1.5.20-5.20091214hg736b6a.el6).

Comment 24 Matěj Cepl 2014-06-16 12:19:51 UTC
Yes, I use   mutt.x86_64 (RHEL package 5:1.5.20-4.20091214hg736b6a.el6_5) and I can confirm it doesn't crash anymore.

Comment 25 jpacner 2014-07-23 14:07:46 UTC
List of patches present on mutt-1.5.20-6.20091214hg736b6a.el6:
http://pkgs.devel.redhat.com/cgit/rpms/mutt/commit/?h=rhel-6.6&id=d5f692c7abf9d2ab32558e21f10c45ba7844def9

Comment 29 errata-xmlrpc 2014-07-28 09:01:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0945.html


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