After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694159 - Malformed content-type header causes infinite recursion
Malformed content-type header causes infinite recursion
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.8.x (obsolete)
Other Linux
: High critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2013-02-19 11:42 UTC by Dan
Modified: 2013-09-13 01:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample email that causes this issue (825 bytes, message/rfc822)
2013-02-19 11:42 UTC, Dan
Details

Description Dan 2013-02-19 11:42:38 UTC
Created attachment 236744 [details]
sample email that causes this issue

Found this while trying to test some script. I had created an email and mis-spelled the MIME header:
Content-Type: text/plain;
and had instead put:
Content-Type: test/plain;

Was able to read the email in Thunderbird and OWA fine, but attempts to view this message crashed evolution once clicking on the message in the message list.
Under normal circumstances this shouldn't be a problem, but mis-named content-types shouldn't crash evolution. I'll work on getting a stack trace, but with the attachment, is simple to reproduce.
Comment 1 Dan 2013-02-19 11:43:18 UTC
adding myself to cc so I receive the reports.
Comment 2 André Klapper 2013-02-19 12:27:56 UTC
Testing with 3.6.3 (latest stable version) is welcome, plus a stacktrace.
Comment 3 Matthew Barnes 2013-02-25 02:02:23 UTC
Confirming, the test message consistently crashes Evolution 3.7.90 as well.

GDB backtrace shows the crash deep within libc trying to assemble a formatted HTML string originating from g_strdup_printf().  Both the format string itself and the string arguments seem fine to me.

valgrind does not reveal any bad memory accesses before it up and dies.

Some kind of deep memory corruption at play here, but no idea from where.
Comment 4 Matthew Barnes 2013-02-25 02:55:21 UTC
Turned out to be infinite recursion, which eventually blew the frame stack.

Fixed for Evolution 3.7.91 and 3.6.4 in:

http://git.gnome.org/browse/evolution/commit/?id=ca30703f70b56e91afa84ccb41ac02fbe87fd0df

http://git.gnome.org/browse/evolution/commit/?h=gnome-3-6&id=881533927325432a0bab7eabea3a1d4008b5bcff