Bug 2285 - segfault when replying to a message containing an attachment with non-ascii filename
Summary: segfault when replying to a message containing an attachment with non-ascii f...
Status: RESOLVED WORKSFORME
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: UI/Compose Window (show other bugs)
Version: 3.7.6
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2010-10-20 02:29 UTC by Lars Kruse
Modified: 2013-11-03 10:31 UTC (History)
1 user (show)

See Also:


Attachments
a message that causes the segfault (330 bytes, text/plain)
2010-10-20 02:29 UTC, Lars Kruse
no flags Details
gdb backtrace of the segfault (11.69 KB, text/plain)
2010-10-20 02:30 UTC, Lars Kruse
no flags Details
valgrind log of the segfault (19 bytes, text/plain)
2010-10-20 15:12 UTC, Lars Kruse
no flags Details

Description Lars Kruse 2010-10-20 02:29:24 UTC
Created attachment 909 [details]
a message that causes the segfault

Hi,

when I try to reply to a specific message containing an attachment with a non-ascii encoded filename, a segfault is triggered.

How to reproduce:
1) mark the message
2) click at "reply"
3) a segfault crashes claws-mail

You can find the (stripped down) message attached.

Additionally I added a backtrace taken with gdb.

The segfault does not get triggered, if I do one of the following things:
A) clear the locale (e.g. running "LANG= claws-mail")
B) shorten the length of the "Content-Type" string of the attachment (the characters do not seem to matter - just the length)

thanks for your work!
Lars
Comment 1 Lars Kruse 2010-10-20 02:30:29 UTC
Created attachment 910 [details]
gdb backtrace of the segfault
Comment 2 Lars Kruse 2010-10-20 02:34:52 UTC
I forgot to mention the details of my setup.

I am running Debian on 32bit i386.
My default locale is de_DE@euro.

The following debian packages related to claws-mail are installed:
ii  claws-mail                              3.7.6-2                              Fast, lightweight and user-friendly GTK2 based email client
ii  claws-mail-acpi-notifier                3.7.6-1+b1                           Laptop's Mail LED control for Claws Mail
ii  claws-mail-archiver-plugin              3.7.6-1+b1                           Archiver plugin for Claws Mail
ii  claws-mail-attach-remover               3.7.6-1+b1                           Mail attachment remover for Claws Mail
ii  claws-mail-attach-warner                3.7.6-1+b1                           Missing attachment warnings for Claws Mail
ii  claws-mail-bsfilter-plugin              3.7.6-1+b1                           Spam filtering using bsfilter for Claws Mail
ii  claws-mail-cache-saver                  3.7.6-1+b1                           Internal cache saver for Claws Mail
ii  claws-mail-dbg                          3.7.6-2                              Debug symbols for Claws Mail mailer
ii  claws-mail-doc                          3.7.6-2                              User documentation for Claws Mail mailer
ii  claws-mail-extra-plugins                3.7.6-1                              Extra plugins collection for Claws Mail
ii  claws-mail-extra-plugins-dbg            3.7.6-1+b1                           Debug symbols for Claws Mail Extra Plugins packages
ii  claws-mail-fancy-plugin                 3.7.6-1+b1                           HTML mail viewer using GTK+ WebKit
ii  claws-mail-feeds-reader                 3.7.6-1+b1                           Feeds (RSS/Atom) reader plugin for Claws Mail
ii  claws-mail-fetchinfo-plugin             3.7.6-1+b1                           Add X-FETCH headers plugin for Claws Mail
ii  claws-mail-geolocation-plugin           3.7.6-1+b1                           Geolocation of senders for Claws Mail
ii  claws-mail-html2-viewer                 3.7.6-1+b1                           HTML mail or attachment viewer for Claws Mail
ii  claws-mail-i18n                         3.7.6-2                              Locale data for Claws Mail (i18n support)
ii  claws-mail-mailmbox-plugin              3.7.6-1+b1                           mbox format mailboxes handler for Claws Mail
ii  claws-mail-multi-notifier               3.7.6-1+b1                           A variety of new mail notifiers for Claws Mail
ii  claws-mail-newmail-plugin               3.7.6-1+b1                           New mail logger plugin for Claws Mail
ii  claws-mail-perl-filter                  3.7.6-1+b1                           Message filtering plugin using perl for Claws Mail
ii  claws-mail-pgpinline                    3.7.6-2                              PGP/inline plugin for Claws Mail
ii  claws-mail-pgpmime                      3.7.6-2                              PGP/MIME plugin for Claws Mail
ii  claws-mail-python-plugin                3.7.6-1+b1                           Python plugin and console for Claws Mail
ii  claws-mail-spam-report                  3.7.6-1+b1                           Spam reporting plugin for Claws Mail
ii  claws-mail-synce-plugin                 3.7.6-1+b1                           Addressbook synchronization with Windows CE devices
ii  claws-mail-themes                       20100514.dfsg-1                      Pixmap icon themes for the Claws Mail mailer
ii  claws-mail-tnef-parser                  3.7.6-1+b1                           TNEF attachment handler for Claws Mail
ii  claws-mail-vcalendar-plugin             3.7.6-1+b1                           vCalendar message handling plugin for Claws Mail
Comment 3 Paul 2010-10-20 08:25:41 UTC
your first attachment does not actually contain a message. can you attach an actual message, or send one privately?
Comment 4 Lars Kruse 2010-10-20 12:31:59 UTC
Hi Paul,

thanks for taking a look at this.
The message attached to this bug report is really minimal (no To, Subject, From, ...).
I edited it by hand to reduce complexity.
You could just put it into a local mail folder (with a new unique number as a filename). On my side the filename was ~/Mail/inbox/test/1
Even in this reduced format the mail was still shown in claws-mail, so I was able to try to "reply" to it.

Anyway: I redirected the original message to your mail address. The subject contains "[KML]" (in case you have problems to recognize it).

Don't forget: you need to set a (probably non-US/GB) locale to trigger the segfault.

thanks for your time!
Lars
Comment 5 Colin Leroy 2010-10-20 13:06:09 UTC
The gdb backtrace seems to point at a crash deep into libiconv inside iconv_open()... Which is rather stable. So this looks like, to me, a memory corruption.

Could you try to valgrind this ?
run 
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind \
  --tool=memcheck --error-limit=no --leak-check=full \
  --show-reachable=yes claws-mail 2>&1 | tee valgrind.log

(See http://www.claws-mail.org/faq/index.php/Debugging_Claws if needed).

I'm also interested in the original mail if possible.

Thanks in advance !
Comment 6 Lars Kruse 2010-10-20 15:12:17 UTC
Created attachment 911 [details]
valgrind log of the segfault
Comment 7 Lars Kruse 2010-10-20 15:14:35 UTC
i just attached the valgrind log.
I am not sure, if I did it properly: when the segfault occoured, valgrind was defunc and I had to kill it. But the error is at the end of the log, so it should be ok.

@Colin: the mail should be in your inbox.

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