[UNIX] apachetop Insecure Temporary File Creation

From: SecuriTeam (support_at_securiteam.com)
Date: 10/06/05

  • Next message: SecuriTeam: "[UNIX] Procom Technology NetFORCE Information Disclosure Vulnerability"
    To: list@securiteam.com
    Date: 6 Oct 2005 10:44:42 +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

    - - - - - - - - -

      apachetop Insecure Temporary File Creation
    ------------------------------------------------------------------------

    SUMMARY

     <http://clueful.shagged.org/apachetop/> apachetop - "Realtime Apache
    monitoring tool. A curses-based top-like display for Apache information,
    including requests per second, bytes per second, most popular URLs, etc."

    apachetop creates a predictable temporary file, this allows a local
    attacked to use the program to preform symlink attacks.

    DETAILS

    Vulnerable Systems:
     * apachetop versions 0.12.5 and prior

    The vulnerability is caused due to temporary file being created
    insecurely. This can be exploited via symlink attacks in combination to
    create and overwrite arbitrary files with the privileges of the user
    running the affected script.

    CVE Information:
     <http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-2660>
    CAN-2005-2660

    Solution:
    Apply : apachetop_CAN-2005-2660.patch
    Patch from Steve Kemp (Debian)
     <http://bugs.gentoo.org/attachment.cgi?id=69342>
    http://bugs.gentoo.org/attachment.cgi?id=69342

    Vulnerable code :
    Take a look at : src/apachetop.h

    247 #define DEBUG_OUTPUT "/tmp/atop.debug"

    Then in : src/apachetop.cc

    85 cf.debug = true;

    1103 int dprintf(const char *fmt, ...) /* {{{ */
    1104 {
    1105 FILE *d;
    1106 va_list args;
    1107
    1108 if (cf.debug && (d = fopen(DEBUG_OUTPUT, "a")))
    1109 {
    1110 va_start(args, fmt);
    1111 vfprintf(d, fmt, args);
    1112 fclose(d);
    1113 va_end(args);
    1114 }
    1115
    1116 return 0;
    1117 } /* }}} */

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:eromang@zataz.net> Eric
    Romang.
    The original article can be found at:
    <http://www.zataz.net/adviso/apachetop-09022005.txt>
    http://www.zataz.net/adviso/apachetop-09022005.txt
    The bug report can be found at:
    <http://bugs.gentoo.org/show_bug.cgi?id=104473>
    http://bugs.gentoo.org/show_bug.cgi?id=104473

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

    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] Procom Technology NetFORCE Information Disclosure Vulnerability"

    Relevant Pages

    • [NT] Sun JVM Insecure Temporary File Creation Allows Remote Code Execution
      ... 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 temporary file creation issue in Sun's Java Virtual Machine combined ... JVM Insecure Temporary File Creation ... an applet is featured that can crash the JVM. ...
      (Securiteam)
    • [UNIX] mysqlhotcopy Insecure Temporary File (copy_index)
      ... 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 vulnerability in mysqlhotcopy allows local attackers to cause the ... Insecure temporary file vulnerability in the mysqlhotcopy script has been ...
      (Securiteam)
    • [UNIX] shtool Insecure Temporary File Creation
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Shtool contains a security flaw that allows a malicious local user to ... The vulnerability is a race condition vulnerability. ... umask and chmod to create secure temporary file. ...
      (Securiteam)
    • [UNIX] GIPTables Firewall Race Condition
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... " GIPTables Firewall is a free set of shell ... The vulnerability is caused due to temporary file being created ...
      (Securiteam)
    • [NEWS] Silc Server and Toolkit Symlink Attack
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... up their own SILC networks. ... Insecure temporary file usage allows local attackers to perform a symlink ... Vendor notified: 2005-06-15 ...
      (Securiteam)