Re: Pi3Web Webserver v2.0 Buffer Overflow Vulnerability

From: Holger Zimmermann (zimpelat_private)
Date: Mon Jan 21 2002 - 11:08:32 PST

  • Next message: Tekno pHReak: "Timbuktu 6.0.1 and Older DoS Advisory"

    
     ('binary' encoding is not supported, stored as-is)
    In-Reply-To: <000b01c19c86$1f3c97e0$3bc283d9@ts>
    
    &gt;Received: (qmail 17088 invoked from network); 14 Jan 2002 17:51:37 -0000
    &gt;Received: from outgoing2.securityfocus.com (HELO outgoing.securityfocus.com) 
    (66.38.151.26)
    &gt;  by mail.securityfocus.com with SMTP; 14 Jan 2002 17:51:37 -0000
    &gt;Received: from lists.securityfocus.com (lists.securityfocus.com [66.38.151.19])
    &gt;	by outgoing.securityfocus.com (Postfix) with QMQP
    &gt;	id 011858F2FE; Mon, 14 Jan 2002 09:59:27 -0700 (MST)
    &gt;Mailing-List: contact bugtraq-helpat_private; run by ezmlm
    &gt;Precedence: bulk
    &gt;List-Id: &lt;bugtraq.list-id.securityfocus.com&gt;
    &gt;List-Post: &lt;mailto:bugtraqat_private&gt;
    &gt;List-Help: &lt;mailto:bugtraq-helpat_private&gt;
    &gt;List-Unsubscribe: &lt;mailto:bugtraq-unsubscribeat_private&gt;
    &gt;List-Subscribe: &lt;mailto:bugtraq-subscribeat_private&gt;
    &gt;Delivered-To: mailing list bugtraqat_private
    &gt;Delivered-To: moderator for bugtraqat_private
    &gt;Received: (qmail 11602 invoked from network); 13 Jan 2002 23:05:57 -0000
    &gt;Message-ID: &lt;000b01c19c86$1f3c97e0$3bc283d9@ts&gt;
    &gt;Repl
    
    Hi,
    
    I tried to figure out this issue, which was originally reported in the bugtraq
    mailing list http://www.securityfocus.com/archive/1/250126 a few days ago and
    found out the following:
    
    There's really a problem with Pi3Web 2.0 CGI handler for physical paths, which
    are exactly MAX_PATH (260) bytes long and end with illegal (series of) dot(s).
    The problem does exist due to a specific behaviour of the Windows API, which
    isn't handled correctly and will crash the server reproducible.
    
    - The problem is limited to Pi3Web 2.0 beta 1&amp;2 on Win32.
    - Linux and Solaris versions aren't affected at all.
    - Older versions of Pi3Web aren't affected.
    - Configurations without CGI aren't affected.
    
    The problem could be reproduced by using the test case described
    in the original report. May be you've to vary the number of dots a bit
    (increase and/or decrease) dependant on the length of the physical path.
    
    A patch fixing the problem is available at sourceforge from now:
    http://sourceforge.net/tracker/index.php?func=detail&aid=505583&group_id=17753&ati
    d=317753
    
    This .ZIP file contains 2 DLL's, which must be replaced in Pi3Web/bin.
    Don't forget to stop Pi3Web before you apply the patch and restart the
    server afterwards.
    
    A configuration based workaround is also possible by addition of the following
    line in object Scripts, e.g. in Pi3Web/Conf/Config.pi3:
    
    &lt;Object&gt;
            Name Scripts
            Class FlexibleHandlerClass
            Condition &quot;&amp;cmp(&amp;dblookup(response,string,ObjectMap),Scripts)&quot;
            # line added to check for script names ending on '.'
            CheckPath Condition=&quot;&amp;regexp(*.,$z)&quot; StatusCode StatusCode=&quot;404&quot;
            ...
    
    Please report, if the problem could be reproduced before you applied the patch and
    if it was safely solved afterwards.
    -- 
    regards
    Holger Zimmermann
    



    This archive was generated by hypermail 2b30 : Mon Jan 21 2002 - 12:31:33 PST