FS#7504 - ssmtp crashes

Attached to Project: Arch Linux
Opened by Andreas Burghardt (teliti) - Sunday, 24 June 2007, 10:00 GMT
Last edited by Greg (dolby) - Tuesday, 22 July 2008, 12:24 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jason Chu (jason)
Andreas Radke (AndyRTR)
Architecture x86_64
Severity High
Priority Normal
Reported Version 2007.05 Duke
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When sending a Mail using mutt (via ssmtp), ssmtp rejects sending
the mail with the following output given by mutt:

*** glibc detected *** ssmtp: munmap_chunk(): invalid pointer: 0x00000000005116ec ***
======= Backtrace: =========
/lib/libc.so.6[0x2ace964d740d]
ssmtp[0x403a38]
ssmtp[0x404399]
ssmtp[0x404d39]
/lib/libc.so.6(__libc_start_main+0xf4)[0x2ace964884e4]
ssmtp[0x401d99]
======= Memory map: ========
00400000-00408000 r-xp 00000000 08:03 261940 /usr/sbin/ssmtp
00508000-00509000 rw-p 00008000 08:03 261940 /usr/sbin/ssmtp
00509000-00532000 rw-p 00509000 00:00 0 [heap]
2ace9612b000-2ace96146000 r-xp 00000000 08:03 537539 /lib/ld-2.6.so
2ace96146000-2ace96148000 rw-p 2ace96146000 00:00 0
2ace96245000-2ace96246000 r--p 0001a000 08:03 537539 /lib/ld-2.6.so
2ace96246000-2ace96247000 rw-p 0001b000 08:03 537539 /lib/ld-2.6.so
2ace96247000-2ace9625b000 r-xp 00000000 08:03 537536 /lib/libnsl-2.6.so
2ace9625b000-2ace9635a000 ---p 00014000 08:03 537536 /lib/libnsl-2.6.so
2ace9635a000-2ace9635c000 rw-p 00013000 08:03 537536 /lib/libnsl-2.6.so
2ace9635c000-2ace9635f000 rw-p 2ace9635c000 00:00 0
2ace9635f000-2ace9636b000 r-xp 00000000 08:03 265481 /usr/lib/libgnutls-openssl.so.13.3.0
2ace9636b000-2ace9646a000 ---p 0000c000 08:03 265481 /usr/lib/libgnutls-openssl.so.13.3.0
2ace9646a000-2ace9646b000 rw-p 0000b000 08:03 265481 /usr/lib/libgnutls-openssl.so.13.3.0
2ace9646b000-2ace965a2000 r-xp 00000000 08:03 537545 /lib/libc-2.6.so
2ace965a2000-2ace966a2000 ---p 00137000 08:03 537545 /lib/libc-2.6.so
2ace966a2000-2ace966a5000 r--p 00137000 08:03 537545 /lib/libc-2.6.so
2ace966a5000-2ace966a7000 rw-p 0013a000 08:03 537545 /lib/libc-2.6.so
2ace966a7000-2ace966ac000 rw-p 2ace966a7000 00:00 0
2ace966ac000-2ace966bb000 r-xp 00000000 08:03 265464 /usr/lib/libtasn1.so.3.0.10
2ace966bb000-2ace967bb000 ---p 0000f000 08:03 265464 /usr/lib/libtasn1.so.3.0.10
2ace967bb000-2ace967bc000 rw-p 0000f000 08:03 265464 /usr/lib/libtasn1.so.3.0.10
2ace967bc000-2ace967bd000 rw-p 2ace967bc000 00:00 0
2ace967bd000-2ace96807000 r-xp 00000000 08:03 264470 /usr/lib/libgcrypt.so.11.2.3
2ace96807000-2ace96906000 ---p 0004a000 08:03 264470 /usr/lib/libgcrypt.so.11.2.3
2ace96906000-2ace96909000 rw-p 00049000 08:03 264470 /usr/lib/libgcrypt.so.11.2.3
2ace96909000-2ace9690c000 r-xp 00000000 08:03 264464 /usr/lib/libgpg-error.so.0.3.1
2ace9690c000-2ace96a0b000 ---p 00003000 08:03 264464 /usr/lib/libgpg-error.so.0.3.1
2ace96a0b000-2ace96a0c000 rw-p 00002000 08:03 264464 /usr/lib/libgpg-error.so.0.3.1
2ace96a0c000-2ace96a7e000 r-xp 00000000 08:03 265483 /usr/lib/libgnutls.so.13.3.0
2ace96a7e000-2ace96b7d000 ---p 00072000 08:03 265483 /usr/lib/libgnutls.so.13.3.0
2ace96b7d000-2ace96b88000 rw-p 00071000 08:03 265483 /usr/lib/libgnutls.so.13.3.0
2ace96b88000-2ace96b89000 rw-p 2ace96b88000 00:00 0
2ace96b89000-2ace96b9d000 r-xp 00000000 08:03 537637 /lib/libz.so.1.2.3
2ace96b9d000-2ace96c9c000 ---p 00014000 08:03 537637 /lib/libz.so.1.2.3
2ace96c9c000-2ace96c9d000 rw-p 00013000 08:03 537637 /lib/libz.so.1.2.3
2ace96c9d000-2ace96c9e000 rw-p 2ace96c9d000 00:00 0
2ace96c9e000-2ace96ca8000 r-xp 00000000 08:03 537547 /lib/libnss_files-2.6.so
2ace96ca8000-2ace96da7000 ---p 0000a000 08:03 537547 /lib/libnss_files-2.6.so
2ace96da7000-2ace96da9000 rw-p 00009000 08:03 537547 /lib/libnss_files-2.6.so
2ace96da9000-2ace96db6000 r-xp 00000000 08:03 261074 /usr/lib/libgcc_s.so.1
2ace96db6000-2ace96eb5000 ---p 0000d000 08:03 261074 /usr/lib/libgcc_s.so.1
2ace96eb5000-2ace96eb6000 rw-p 0000c000 08:03 261074 /usr/lib/libgcc_s.so.1
7fff14969000-7fff1497f000 rw-p 7fff14969000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vdso]

With best regards,

Andreas
This task depends upon

Closed by  Greg (dolby)
Tuesday, 22 July 2008, 12:24 GMT
Reason for closing:  Not a bug
Comment by Andreas Radke (AndyRTR) - Tuesday, 03 July 2007, 22:16 GMT
please try ssmtp-2.61-4.pkg.tar.gz if it has it fixed.
Comment by Andreas Radke (AndyRTR) - Friday, 13 July 2007, 21:49 GMT
can this be closed?
Comment by Dawid Wróbel (cromo) - Thursday, 11 October 2007, 13:43 GMT
  • Field changed: Percent Complete (100% → 0%)
This segfault is still here as of 2.61-4
Comment by Andreas Radke (AndyRTR) - Thursday, 11 October 2007, 19:16 GMT
i don't have such a mail setup. make sure all packages on your system are up to date. can you please try if rebuilding ssmtp solves it?
Comment by Dawid Wróbel (cromo) - Thursday, 11 October 2007, 20:44 GMT
I am up to day all the time and also tried to rebuild ssmtp, but it's still crashing. I set the following:
root=cromo
mailhub=klej.net
rewriteDomain=cromo@klej.net
hostname=klej.net

All of these correspond to the smtp settings of my mail account. I think you can freely use them, as the ssmtp will crash even before sending out anything.
Comment by Dawid Wróbel (cromo) - Thursday, 11 October 2007, 20:44 GMT
*"up to date" of course.
Comment by Aaron Griffin (phrakture) - Monday, 22 October 2007, 05:47 GMT
I'm pretty sure this is an upstream issue. Could you file the bug with the ssmtp developers?
Comment by Andreas Radke (AndyRTR) - Sunday, 28 October 2007, 20:00 GMT
any progress? please test recent ssmtp pkg 2.61-5. any upstream bug url you have filed we can follow?
Comment by Dawid Wróbel (cromo) - Sunday, 28 October 2007, 21:50 GMT
2.61-5 didn't make it. I actually have already tried to contact upstream devs, but frankly I can't find any way to do so? No project website, no nothing. Any hints?
Comment by Andreas Radke (AndyRTR) - Sunday, 28 October 2007, 21:54 GMT
http://packages.qa.debian.org/s/ssmtp.html - i think you can directly mail those maintainers. probably these are also upstream devs.
Comment by Dawid Wróbel (cromo) - Sunday, 28 October 2007, 22:17 GMT
Ok, i've sent an email to leading maintainer, hope it will help. Will let you know if I get some help.
Comment by Greg (dolby) - Wednesday, 05 December 2007, 18:13 GMT
You could try using mutt's built-in smtp now instead. Its enabled in the arch package.
Comment by Greg (dolby) - Saturday, 24 May 2008, 09:35 GMT
Does this still happen?
Comment by Dawid Wróbel (cromo) - Thursday, 29 May 2008, 12:44 GMT
Yes, this bug is still here.
Comment by Alessandro Doro (adoroo) - Monday, 21 July 2008, 19:41 GMT
Dawid, your configuration is wrong.
rewriteDomain should only contain the domain name, without the username part.

Here it is my ssmtp.conf:
root=postmaster
mailhub=smtp.myispdomain.xx
# I leave rewriteDomain unset
#rewriteDomain=
# I like to set hostname to `uname -n`
hostname=something
# I let mutt set the from line
FromLineOverride=YES

I was able to reproduce the bug with
rewriteDomain=myusername@myispdomain.xx

Sure the program shouldn't crash because of bad user input/configuration. This is an upstream bug.

Note: latest upstream version is 2.62-1, the Arch package is outdated.
Comment by Alessandro Doro (adoroo) - Monday, 21 July 2008, 20:11 GMT
# tail -2 /var/log/mail.log
Mon dd hh:mm:ss something sSMTP[pid]: Set RewriteDomain="myusername@myispdomain.xx" is invalid
Mon dd hh:mm:ss something sSMTP[pid]: Set RewriteDomain="myispdomain.xx" used

Aargh, the program correctly detects the error and crashes later.
Comment by Dawid Wróbel (cromo) - Tuesday, 22 July 2008, 11:25 GMT
OK, I fixed the problem here. Thanks. However, I found out some security issue. If you want to put the password for the account in file any user can read that. The possible fix is described here: http://wiki.freebsd.org/SecureSSMTP . But I think I have to open another ticket for this anyway.

Loading...