eXtremail Remote Format String Security Vulnerability
24 Jun. 2001
Summary
eXtremail is a free integrated pop3/smtpd mail daemon for Linux (x86). Despite being free, it is a closed sourced software. Apparently, the majority of the newer versions are vulnerable to a remotely exploitable format string condition.
Credit:
The information has been provided by mu-b.
Vulnerable systems:
eXtremail version 1.1.5
eXtremail version 1.1.6
eXtremail version 1.1.7
eXtremail version 1.1.8
eXtremail version 1.1.9
Immune systems:
eXtremail version 1.1.10
The format string problem is located in the flog() function, and is caused by the use of user defined data as the format string for an fprintf() statement. This problem can be exploited remotely to yield remote root privileges, through sending appropriately constructed strings as the arguments to the following commands:
Smtpd - HELO / EHLO / MAIL FROM:<....@....> / RCPT TO:<....@....>
Pop3 - USER (+ others requiring a suitable login).
Solution:
This issue has been patched as of version 1.1.10, it is advisable that current or prospective users download this version as soon as possible. This is obtainable from the eXtremail homepage found at http://www.extremail.com.
Exploit:
/* eXtremail-exp.c
*
* - eXtremail v1.1.5-9 Remote Root Exploit (x86) -
*
* - Tested on: RedHat 7.0 eXtremail v1.1.5
* RedHat 7.0 eXtremail v1.1.6
* RedHat 7.0 eXtremail v1.1.7
* RedHat 7.0 eXtremail v1.1.8
* RedHat 7.0 eXtremail v1.1.9
* NOT VULNERABLE eXtremail v1.1.10
*
* Copyright (c) 2001 by <mu-b@digit-labs.org>
*
* eXtremail v1.1.5+ has a format string problem
* in flog(). This problem affects all user commands
* (helo/ehlo/mail from:/rcpt to:), and is caused
* by an improper fprintf() to the servers logfile.
*
* Buffers for helo/ehlo are too small (except v1.1.5),
* therefore we use mail from: instead :).
*
* Note: Return Address's are quite tight due to the small
* buffers. Returning to the Heap is possible but
* is VERY unstable.
*
* Greets: mjm, all@alldas.de, teleh0r, grazer, cmds, gollum, #!digit-labs
*
* http://www.digit-labs.org/ -- Digit-Labs 2001!@$!
*/