[UNIX] Net::Server's log() Function Syslog Usage Allows for a Format String Vulnerability

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

  • Next message: SecuriTeam: "[UNIX] Shoutbox Administrative Hash Retrieval"
    To: list@securiteam.com
    Date: 25 Apr 2005 18:36:18 +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

    - - - - - - - - -

      Net::Server's log() Function Syslog Usage Allows for a Format String
    Vulnerability
    ------------------------------------------------------------------------

    SUMMARY

    The undocumented but frequently used "log" function provided by the
    Net::Server Perl module is not safe against format string vulnerability.

    DETAILS

    Vulnerable Systems:
     * Net::Server version 0.87

    The syslog call in function log is implemented like following:
      ### log only to syslog if setup to do syslog
      if( $prop->{log_file} eq 'Sys::Syslog' ){
        $level = $level!~/^\d+$/ ? $level : $Net::Server::syslog_map->{$level}
    ;
        Sys::Syslog::syslog($level,@_); <---!!!!!!
        return;
      }

    Sys::Syslog tells how to use function "syslog":
           syslog $priority, $format, @args
               If $priority permits, logs ($format, @args) printed as by
               "printf(3V)", with the addition that %m is replaced with "$!"
    (the latest error message).

    Unfortunately, the function "log" of Net::Server put now the first given
    log argument into "syslog" function as format string, and the others as
    arguments.

    Workaround:
    As a workaround, programs using "log" of Net::Server can replace a single
    "%" by "%%", but only in case of when syslog is used.

    Impact of workaround: programs which call "log" of Net::Server with format
    string in first log argument will break.

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:pbieringer@aerasec.de> Dr.
    Peter Bieringer.

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

    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: "[UNIX] Shoutbox Administrative Hash Retrieval"

    Relevant Pages

    • [TOOL] SnortALog - Snort Analyzer Logs
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... SnortALog works with all versions of SNORT and is ... the only script who can analyze snort's logs in all formats (Syslog, ...
      (Securiteam)
    • [NT] TFTPd Filename Format String
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... A format string vulnerability in TFTPd32 allows remote attackers to cause ... You can trigger this vulnerability by sending SEND or GET ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [UNIX] Format String Vulnerability In GNATS
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... GNU GNATS is a set of tools for ... case SYSLOG: ...
      (Securiteam)
    • [UNIX] Game Networking Engine Format String
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Game Networking Engine Format String ... 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. ...
      (Securiteam)
    • [UNIX] Dropbear SSH Server Format String Vulnerability
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... A remotely exploitable format string vulnerability exists in the default ... configuration of the Dropbear SSH Server up until version 0.35, ... will fail before the vulnerable code is executed, but the methodname may ...
      (Securiteam)