|
__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Sun Buffer Overflow in Web Connector Module of Application Server [Sun(sm) Alert Notification 52022] March 26, 2003 23:00 GMT Number N-064 ______________________________________________________________________________ PROBLEM: An unbound string operation causes a stack buffer overflow in the Web Connector Plugin module. PLATFORM: * Sun ONE/iPlanet Application Server 6.0 * Sun ONE/iPlanet Application Server 6.0 Service pack 1 * Sun ONE/iPlanet Application Server 6.0 Service pack 2 * Sun ONE/iPlanet Application Server 6.0 Service pack 3 * Sun ONE/iPlanet Application Server 6.0 Service pack 4 * Sun ONE/iPlanet Application Server 6.5 * Sun ONE/iPlanet Application Server 6.5 Maintenance Update 1 * Sun ONE/iPlanet Application Server 6.5 Maintenance Update 2 The following web servers on all supported platforms are impacted when the web connector plugin is installed: * Sun ONE/iPlanet Web Server * Microsoft IIS * Apache DAMAGE: May cause the web server to crash, or possibly allow an attacker to gain control of the web server. SOLUTION: Apply available patches and workarounds as indicated in Sun's Alert Notification. ______________________________________________________________________________ VULNERABILITY The risk is HIGH. A remote attacker who successfully crashes a ASSESSMENT: vulnerable web server may gain control of that web server. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/n-064.shtml ORIGINAL BULLETIN: http://www.sunsolve.sun.com/pub-cgi/ retrieve.pl?doc=fsalert%2F52022&zone_32=category%3Asecurity ______________________________________________________________________________ [***** Start Sun(sm) Alert Notification 52022 *****] Sun(sm) Alert Notification Sun Alert ID: 52022 Synopsis: Buffer Overflow in Web Connector Module of Application Server Category: Security Product: Sun ONE Application Server BugIDs: 4652612 Avoidance: Workaround, Patch, Upgrade State: Resolved Date Released: 24-Mar-2003 Date Closed: 24-Mar-2003 Date Modified: 1. Impact A buffer overflow exists in the Web Connector Plugin that ships with the Sun ONE Application Server 6.x product line. This Web Connector Plugin enables integration between a web server and the Sun ONE Application Server. Incoming HTTP request URLs are handled by this module and an unbounded string operation can cause a overflow. It may be possible to crash the web server being used and potentially gain control of that web server. Sun acknowledges, with thanks, @stake for bringing this issue to our attention and for suggesting the basis of the workaround . This issue is described in the @stake Security Advisory located at: http://www.atstake.com/research/advisories/2003/a031303-1.txt. 2. Contributing Factors This issue can occur in the following releases: Versions of the Sun ONE Application Server impacted: Sun ONE/iPlanet Application Server 6.0 Sun ONE/iPlanet Application Server 6.0 Service pack 1 Sun ONE/iPlanet Application Server 6.0 Service pack 2 Sun ONE/iPlanet Application Server 6.0 Service pack 3 Sun ONE/iPlanet Application Server 6.0 Service pack 4 Sun ONE/iPlanet Application Server 6.5 Sun ONE/iPlanet Application Server 6.5 Maintenance Update 1 Sun ONE/iPlanet Application Server 6.5 Maintenance Update 2 The following web servers on all supported platforms are impacted when the web connector plugin is installed: Sun ONE/iPlanet Web Server Microsoft IIS Apache Note: The exact web server versions are listed in the release notes for each version of the Sun ONE Application Server. There is no bug in the web server product. Versions of the Sun ONE Application Server that are NOT impacted: Sun ONE Application Server 6.5 Maintenance Update 3 Sun ONE/iPlanet Application Server 6.5 SP1 Sun ONE Application Server 7 Platform Edition Sun ONE Application Server 7 Standard Edition 3. Symptoms The web server may exit abnormally ("crash"). Solution Summary Top 4. Relief/Workaround The following patches are available: http://wwws.sun.com/software/download/products/3e7a563d.html Instructions to apply the patches/workarounds: Note: For windows it would be a "DLL" instead of an "so" file. README files are attached with the patches. Sun ONE/iPlanet Web Server 4.1 Service Pack 1 through 12: In the config directory of the particular webserver instance, (e.g. iws4.13/https-ias/config), make the following two changes in the "obj.conf" file: 1) Add the following entry: Init fn="load-modules" shlib="<path to location of patch>/nsapipatch.so" funcs="check_uri_length" Ensure that the line is added before the existing Init entries. 2) Add the following entry within the <Object name=default> section, as the first line of the section: NameTrans fn="check_uri_length" maxlength=255 Now the "obj.conf" file will contain something like the following: ... Init fn="load-modules" shlib="/<path to location of patch><nsapipatch.so" funcs="check_uri_length" ... <Object name=default> NameTrans fn="check_uri_length" maxlength=255 ... </Object> Restart the webserver instance. The "maxlength" value must be set to 255 to protect the web server from this buffer overflow. Sun ONE/iPlanet Web Server 6.0 Service Pack 1 through 5 "download": In the config directory of the particular webserver instance, (e.g. iws6.0sp2b/https-ias/config), add the following entry in the "magnus.conf" file such that this entry appears before the iAS webconnector plugin entries: Init fn="load-modules" shlib="<path to location of patch>/nsapipatch.so" funcs="check_uri_length" Add the following entry in the "obj.conf" file within <Object name=default> section as the first entry: NameTrans fn="check_uri_length" maxlength=255 Now the "obj.conf" file will contain something like the following: <Object name=default> NameTrans fn="check_uri_length" maxlength=255 ... </Object> Restart the webserver instance. The "maxlength" value must be set to 255 to protect the web server from this buffer overflow. Microsoft IIS(only for Windows) users : Copy "iispatch.dll" to a suitable directory, for example, C:\winnt\system32\iispatch.dll. Goto Windows Registry HK_LOCAL_MACHINE / SYSTEM/CurrentControlSet/Services/W3SVC/Parameters. Edit "Filter DLLs" key. Prepend the value by the above path followed by a comma(','). Now the new registry value looks like the following: C:\winnt\system32\iispatch.dll,c:\inetpub\wwwroot\cgi-bin\gx.dl Restart the webserver instance. Apache Web Server: Edit the "httpd.conf" file and add the line "LimitRequestLine 255". Restart the webserver. Notes: In addition to the patches/workarounds mentioned above, the following configuration can be used on Solaris platforms . Some relief to the buffer overflow is available by enabling non-executable user stacks (although this does not provide 100 percent protection against exploitation of this vulnerability, it makes the likelihood of a successful exploit much smaller). This workaround is only effective on sun4u, sun4m, and sun4d architectures (enter "uname -m" to display a systems architecture). This workaround will not work on Intel platforms. To enable non-executable program stacks add the following lines to the "/etc/system" file and reboot the system: set noexec_user_stack = 1 set noexec_user_stack_log = 1 On other operating systems, workarounds may exist and please follow guidelines from respective vendors. 5. Resolution This issue is addressed in the following releases: Sun ONE Application Server 6.5 Maintenance Update 3 Sun ONE Application Server 6.5 Service Pack 1 Available at: http://wwws.sun.com/software/download/app_servers.html. [***** End Sun(sm) Alert Notification 52022 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of Sun Microsystems, Inc. and @stake, Inc. for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 925-422-8193 (7x24) FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@ciac.org Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ Anonymous FTP: ftp.ciac.org PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained via WWW at http://www.first.org/. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) N-054: Unchecked Buffer in Windows Component Could Cause Web Server Compromise N-055: Samba smbd Buffer Overrun Vulnerability N-056: Red Hat Updated 2.4 Kernel Fix for ptrace Vulnerability N-057: Cryptographic weaknesses in Kerberos v4 protocol N-058: Vulnerabilities in Webmin/Usermin N-059: Integer overflow in Sun RPC XDR library routines N-060: Vulnerabilities in Tomcat 3.3.1 N-061: OpenSSL Timing-based Attacks on RSA Keys N-062: MIT krb5 Buffer overrun and underrun in Principal Name Handling N-063: Microsoft Windows Script Engine Vulnerability