[UNIX] ssmtp Insecure File Creation

From: SecuriTeam (support_at_securiteam.com)
Date: 05/02/04

  • Next message: SecuriTeam: "[EXPL] Windows Lsasrv.dll Remote Universal Exploit (MS04-011)"
    To: list@securiteam.com
    Date: 2 May 2004 11:27:43 +0200
    
    

    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

    The SecuriTeam alerts list - Free, Accurate, Independent.

    Get your security news from a reliable source.
    http://www.securiteam.com/mailinglist.html

    - - - - - - - - -

      ssmtp Insecure File Creation
    ------------------------------------------------------------------------

    SUMMARY

     <http://packages.debian.org/stable/mail/ssmtp.html> ssmtp is "A secure,
    effective and simple way of getting mail off a system to your mail hub. It
    contains no suid-binaries or other dangerous things - no mail spool to
    poke around in, and no daemons running in the background. Mail is simply
    forwarded to the configured mailhost. Extremely easy configuration."

    Due to a problem in how ssmtp creates its log file, an attacker is able to
    overwrite any arbitrary file on the system, with privileges equal to those
    of the ssmtp server (usually root).

    DETAILS

    Vulnerable Systems:
     * ssmtp version 2.50.6

    The server creates a log file at /tmp/ssmtp.log, the contents of which can
    be specified by the user. Due to a bug in the code, an attacker is able to
    overwrite files on the target machine.

    The vulnerable call is in log_event:
    #ifdef LOGFILE
            if((fp = fopen("/tmp/ssmtp.log", "a")) != (FILE *)NULL) {
                    (void)fprintf(fp, "%s\\n", buf);
                    (void)fclose(fp);

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:priestmaster@sms.at> Priest.

    ========================================

    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.


  • Next message: SecuriTeam: "[EXPL] Windows Lsasrv.dll Remote Universal Exploit (MS04-011)"