using rewriteDomain ssmtp crashes with: munmap_chunk(): invalid pointer: 0x08fa95f5

Bug #697183 reported by Gavin McCullagh
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ssmtp (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: ssmtp

Hi,

I recently found that if I set rewriteDomain to <email address hidden> and try to send email with ssmtp, it dies rather horribly. The docs on ssmtp are pretty sparse so I may be using the directive wrong but either way it shouldn't crash like this. See below...

---------------------------------------------------------------------------------------
gavinmc@ringmaster2:~$ mail <email address hidden>

Cc:
Subject: test

sdkhsd

.
*** glibc detected *** /usr/sbin/sendmail: munmap_chunk(): invalid pointer: 0x08fa95f5 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0x244591]
/lib/tls/i686/cmov/libc.so.6(+0x6c80e)[0x24580e]
/usr/sbin/sendmail[0x804b0d8]
/usr/sbin/sendmail[0x804bfe8]
/usr/sbin/sendmail[0x804cc61]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x1efbd6]
/usr/sbin/sendmail[0x8049671]
======= Memory map: ========
00110000-0012d000 r-xp 00000000 08:01 680077 /lib/libgcc_s.so.1
0012d000-0012e000 r--p 0001c000 08:01 680077 /lib/libgcc_s.so.1
0012e000-0012f000 rw-p 0001d000 08:01 680077 /lib/libgcc_s.so.1
0013f000-00142000 r-xp 00000000 08:01 679959 /lib/libgpg-error.so.0.4.0
00142000-00143000 r--p 00002000 08:01 679959 /lib/libgpg-error.so.0.4.0
00143000-00144000 rw-p 00003000 08:01 679959 /lib/libgpg-error.so.0.4.0
001d9000-0032c000 r-xp 00000000 08:01 696354 /lib/tls/i686/cmov/libc-2.11.1.so
0032c000-0032d000 ---p 00153000 08:01 696354 /lib/tls/i686/cmov/libc-2.11.1.so
0032d000-0032f000 r--p 00153000 08:01 696354 /lib/tls/i686/cmov/libc-2.11.1.so
0032f000-00330000 rw-p 00155000 08:01 696354 /lib/tls/i686/cmov/libc-2.11.1.so
00330000-00333000 rw-p 00000000 00:00 0
004de000-004e4000 r-xp 00000000 08:01 696451 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
004e4000-004e5000 r--p 00006000 08:01 696451 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
004e5000-004e6000 rw-p 00007000 08:01 696451 /lib/tls/i686/cmov/libnss_compat-2.11.1.so
006aa000-006c5000 r-xp 00000000 08:01 680107 /lib/ld-2.11.1.so
006c5000-006c6000 r--p 0001a000 08:01 680107 /lib/ld-2.11.1.so
006c6000-006c7000 rw-p 0001b000 08:01 680107 /lib/ld-2.11.1.so
00706000-0079c000 r-xp 00000000 08:01 1360729 /usr/lib/libgnutls.so.26.14.12
0079c000-007a0000 r--p 00095000 08:01 1360729 /usr/lib/libgnutls.so.26.14.12
007a0000-007a1000 rw-p 00099000 08:01 1360729 /usr/lib/libgnutls.so.26.14.12
00846000-008b6000 r-xp 00000000 08:01 680003 /lib/libgcrypt.so.11.5.2
008b6000-008b7000 r--p 00070000 08:01 680003 /lib/libgcrypt.so.11.5.2
008b7000-008b9000 rw-p 00071000 08:01 680003 /lib/libgcrypt.so.11.5.2
0093c000-0094b000 r-xp 00000000 08:01 1360412 /usr/lib/libtasn1.so.3.1.7
0094b000-0094c000 r--p 0000e000 08:01 1360412 /usr/lib/libtasn1.so.3.1.7
0094c000-0094d000 rw-p 0000f000 08:01 1360412 /usr/lib/libtasn1.so.3.1.7
00971000-00972000 r-xp 00000000 00:00 0 [vdso]
0099b000-009a5000 r-xp 00000000 08:01 696455 /lib/tls/i686/cmov/libnss_files-2.11.1.so
009a5000-009a6000 r--p 00009000 08:01 696455 /lib/tls/i686/cmov/libnss_files-2.11.1.so
009a6000-009a7000 rw-p 0000a000 08:01 696455 /lib/tls/i686/cmov/libnss_files-2.11.1.so
00a33000-00a3b000 r-xp 00000000 08:01 696459 /lib/tls/i686/cmov/libnss_nis-2.11.1.so
00a3b000-00a3c000 r--p 00007000 08:01 696459 /lib/tls/i686/cmov/libnss_nis-2.11.1.so
00a3c000-00a3d000 rw-p 00008000 08:01 696459 /lib/tls/i686/cmov/libnss_nis-2.11.1.so
00bae000-00bc1000 r-xp 00000000 08:01 696386 /lib/tls/i686/cmov/libnsl-2.11.1.so
00bc1000-00bc2000 r--p 00012000 08:01 696386 /lib/tls/i686/cmov/libnsl-2.11.1.so
00bc2000-00bc3000 rw-p 00013000 08:01 696386 /lib/tls/i686/cmov/libnsl-2.11.1.so
00bc3000-00bc5000 rw-p 00000000 00:00 0
00dee000-00df7000 r-xp 00000000 08:01 1360909 /usr/lib/libgnutls-openssl.so.26.14.12
00df7000-00df8000 r--p 00008000 08:01 1360909 /usr/lib/libgnutls-openssl.so.26.14.12
00df8000-00df9000 rw-p 00009000 08:01 1360909 /usr/lib/libgnutls-openssl.so.26.14.12
00f46000-00f59000 r-xp 00000000 08:01 681717 /lib/libz.so.1.2.3.3
00f59000-00f5a000 r--p 00012000 08:01 681717 /lib/libz.so.1.2.3.3
00f5a000-00f5b000 rw-p 00013000 08:01 681717 /lib/libz.so.1.2.3.3
08048000-0804f000 r-xp 00000000 08:01 1360765 /usr/sbin/ssmtp
0804f000-08050000 r--p 00006000 08:01 1360765 /usr/sbin/ssmtp
08050000-08051000 rw-p 00007000 08:01 1360765 /usr/sbin/ssmtp
08051000-08055000 rw-p 00000000 00:00 0
08fa8000-08fc9000 rw-p 00000000 00:00 0 [heap]
b77e4000-b77e7000 rw-p 00000000 00:00 0
b77f5000-b77f8000 rw-p 00000000 00:00 0
bff83000-bff98000 rw-p 00000000 00:00 0 [stack]
---------------------------------------------------------------------------------------

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: ssmtp 2.64-4fakesync1
ProcVersionSignature: Ubuntu 2.6.32-27.49-generic 2.6.32.26+drm33.12
Uname: Linux 2.6.32-27-generic i686
Architecture: i386
Date: Tue Jan 4 10:23:54 2011
ProcEnviron:
 LANG=en_IE.UTF-8
 SHELL=/bin/bash
SourcePackage: ssmtp

Revision history for this message
Gavin McCullagh (gmccullagh) wrote :
Revision history for this message
Gavin McCullagh (gmccullagh) wrote :

the syslog does indeed show:

Jan 4 10:06:32 ringmaster2 sSMTP[15849]: Set RewriteDomain="root@ourdomain" is invalid
Jan 4 10:06:32 ringmaster2 sSMTP[15849]: Set RewriteDomain="ourdomain" used

and when I correct it the crash goes away, but it really shouldn't crash having detected a small config error.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ssmtp (Ubuntu):
status: New → Confirmed
Revision history for this message
Jannik Grube (nulldeluxe) wrote :
Revision history for this message
Jannik Grube (nulldeluxe) wrote :

Here's the patch from the debian bug report #519954
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519954

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "ssmtp-rewritedomain-with@-fix.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Darren Conway (darren-conway) wrote :

I have hit this bug as well. I get an error message if any value (a valid address or not) is entered.
It looks like this bug has been around for at least 8 years (I am writing this 2017).
The cause has been identified.
It would be nice if it was fixed.

Revision history for this message
Darren Conway (darren-conway) wrote :

Correct to above.
Like the others, the bug occurs with an invalid address.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.