__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Buffer Overflow in Some Implementations of IMAP Servers October 26, 1998 19:00 GMT Number I-074 ______________________________________________________________________________ PROBLEM: A vulnerability exist in the library code from the University of Washington IMAP server that handles SASL server-level authentication. A buffer overflow may occur in some implementations of IMAP servers. PLATFORM: University of Washington IMAP server prior to version of imap-4.1. University of Washington IMAP4rev1 servers prior to v10.234. Any v10.234 server that was distributed with Pine 4.0. Any imap-4.1.BETA DAMAGE: If exploited, remote intruders may gain root access. SOLUTION: Install the most recent version of imapd or disable the IMAP server. ______________________________________________________________________________ VULNERABILITY Information about this vulnerability has been posted to various ASSESSMENT: public mailing lists and newsgroups. ______________________________________________________________________________ [ Appended on October 26, 1998 with additional patch information from Sun Microsystems, Inc. ] [ Start CERT Advisory ] ============================================================================= CERT* Advisory CA-98.09 Original issue date: July 20, 1998 Topic: Buffer Overflow in Some Implementations of IMAP Servers - -------------------------------------------------------------------------- The CERT Coordination Center has received reports regarding a vulnerability in some implementations of IMAP servers. The CERT/CC recommends that anyone running a vulnerable version of this software upgrade to the current vendor-recommended version. Until you can do so, we suggest disabling the vulnerable IMAP server. We will update this advisory as we receive additional information. We encourage you to check our web site regularly for updates to this advisory that may relate to your site. - -------------------------------------------------------------------------- I. Description The CERT Coordination Center has received reports regarding a buffer overflow in some implementations of IMAP servers. The overflow is in library code from the University of Washington IMAP server that handles SASL server-level authentication. This vulnerability is different from the one discussed in CERT Advisory CA-97.09.imap_pop. Information about this vulnerability has been posted to various public mailing lists and newsgroups. All versions of the University of Washington IMAP server prior to the final (frozen, non-beta) version of imap-4.1 that support SASL server-level authentication are vulnerable. The vulnerability affects all University of Washington IMAP4rev1 servers prior to v10.234. Also, any v10.234 server that was distributed with Pine 4.0 or any imap-4.1.BETA is vulnerable. Additionally, the vulnerability is present in other IMAP servers that use library code from the University of Washington IMAP server to handle SASL server-level authentication. IMAP servers that share no code with the University of Washington server are not vulnerable. Some operating systems ship with a vulnerable version of this software installed and enabled by default. Please refer to the Vendor Information section below for more information about your vendor. II. Impact Remote intruders can execute arbitrary commands under the privileges of the process running the vulnerable IMAP server. If the vulnerable IMAP server is running as root, remote intruders can gain root access. III. Solution A. Determine if your version of imapd is vulnerable To determine if a system is vulnerable, first telnet to port 143 on that host. If it is running an IMAP server, the banner will show the version. For example: % telnet host.your.domain.com 143 Trying 123.123.123.123... Connected to host. Escape character is '^]'. * OK host.your.domain.com IMAP4rev1 v10.190 server ready In the above example, the IMAP server is the University of Washington IMAP4rev1 v10.190. Since all University of Washington IMAP4rev1 servers prior to v10.234 are vulnerable, the server in the above example is vulnerable. Please consult the Vendor Information section below for information about other vulnerable IMAP servers. B. Install the most recent version of imapd Obtain and install the most recent version, or patch for your IMAP server. Appendix A contains input from vendors who have provided information for this advisory. C. Workaround If you are unable to upgrade to a version that is not vulnerable, we urge you to disable the IMAP server until you are able to address the problem. - -------------------------------------------------------------------------- Appendix A - Vendor Information Below is a list of the vendors who have provided information for this advisory. We will update this appendix as we receive additional information. If you do not see your vendor's name, the CERT/CC did not hear from that vendor. Please contact the vendor directly. - -------------------------------------------------------------------------- IMAP Server Vendors Cyrus This does not affect the Cyrus imapd. Cyrus imapd shares no code with the University of Washington imapd. Esys Corporation We are not affected by the problem described in the advisory. We do not ship any University of Washington based software at this time. We have never shipped any of the IMAP 4.x software from the University of Washington. NEC Corporation The University of Washington imapd is shipped with our product "Mobilenet/IMAP" and so it is vulnerable. Netscape Netscape Messaging Server 3.55 and before are susceptible to this vulnerability. However, it should be noted that Netscape Messaging Server (any version) does NOT run as root and therefore, the exposure is much more limited than the University of Washington example. Regardless, we have released a patch available at http://help.netscape.com/products/server/messaging which addresses this vulnerability. Sun Microsystems Sun Microsystems is working on patches for Solstice Internet Mail Server product versions 2.0, 3.1 and 3.2. University of Washington A security problem has been detected with the University of Washington IMAP server that is included in the Pine 4.00 distribution. This will be fixed in the forthcoming Pine 4.01 maintenance release. Until then, if you are using the UW IMAP server, please update it with the following distribution: ftp://ftp.cac.washington.edu/mail/imap.tar.Z This vulnerability affects all IMAP4rev1 servers prior to v10.234. v10.234 may or may not be vulnerable; if it came from Pine 4.00 or from any imap-4.1.BETA then it is vulnerable. IMAP2bis servers are immune. This problem is also fixed in the imap-4.2 toolkit, which is tentatively expected to be released in conjunction with Pine 4.01. Any IMAP4rev1 server whose version starts with "v11" will be immune. - -------------------------------------------------------------------------- Operating System Vendors Berkeley Software Design, Inc. The version of IMAP shipped with BSD/OS 2.1 and 3.0/3.1 is the older version which does not include the vulnerability. The version of IMAP which will be included in the upcoming 4.0 release has been updated to include the security fixes. Caldera Linux Caldera: releasing patched imap-4.1; will release imap-4.2 as soon as it becomes available. URL: ftp://ftp.caldera.com/pub/OpenLinux/updates/1.2/010 6df741b4217f03bf773b54509a7d283a imap-4.1.BETA-5.i386.rpm d3526121c68b611524fc72746204d752 imap-4.1.BETA-5.src.rpm Compaq Computer Corporation (c) Copyright 1994, 1995, 1996, 1997, 1998 Compaq Computer Corporation. All rights reserved. SOURCE: Compaq Computer Corporation Compaq Services Software Security Response Team USA This reported problem is not present for the as shipped, Compaq's Digital ULTRIX or Compaq's Digital UNIX Operating Systems Software. - Compaq Computer Corporation Data General We are investigating. We will provide an update when our investigation is complete. FreeBSD FreeBSD does not ship default with imap. However, there is a version of imapd from Washington University in the FreeBSD ports collections, known as imap-uw. If anyone is using the imap port, we suggest fetching the latest revision of imap and manually install it, or wait until the FreeBSD port is updated and reinstall imap-uw using the ports system. You can check the ports status at: http://www.freebsd.org/ports/mail.html Fujitsu Our operating system, UXP/V, does not support imapd. Therefore, it is not vulnerable to the above vulnerability. Hewlett-Packard Company HP does not ship the University of Washington IMAP server. IBM Corporation The version of imapd shipped with AIX 4.2 and 4.3 is vulnerable. We are currently working on the following fixes which will be available soon: AIX 3.2.x: imapd not shipped (not vulnerable) AIX 4.1.x: imapd not shipped (not vulnerable) AIX 4.2.x: IX80446 AIX 4.3.x: IX80447 To Order -------- APARs may be ordered using Electronic Fix Distribution (via FixDist) or from the IBM Support Center. For more information on FixDist, reference URL: http://aix.software.ibm.com/aix.us/swfixes/ or send e-mail to aixserv@austin.ibm.com with a subject of "FixDist". IBM and AIX are registered trademarks of International Business Machines Corporation. NetBSD NetBSD does not ship the UW imapd daemon in its standard or development operating system releases. Our optional package system also does not include it at this time. OpenBSD OpenBSD has never shipped an imap daemon. Red Hat Linux Serious security problems have been found in all versions of imap shipped with Red Hat Linux. If "rpm -q imap" shows that imap is installed on your system, please upgrade to these new imap releases immediately, or remove imap by running "rpm -e imap". Note that Red Hat's imap package also provides a POP server, so only remove it if you don't need to provide POP services. Thanks to everyone who helped find these problems, Olaf Kirch in particular. Red Hat 5.0 and 5.1 ------------------- i386: rpm -Uvh ftp://ftp.redhat.com/updates/5.0/i386/imap-4.1.final-1.i386.rpm alpha: rpm -Uvh ftp://ftp.redhat.com/updates/5.0/alpha/imap-4.1.final-1.alpha.rpm SPARC: rpm -Uvh ftp://ftp.redhat.com/updates/5.0/sparc/imap-4.1.final-1.sparc.rpm Red Hat 4.2 ----------- i386: rpm -Uvh ftp://ftp.redhat.com/updates/4.2/i386/imap-4.1.final-0.i386.rpm alpha: rpm -Uvh ftp://ftp.redhat.com/updates/4.2/alpha/imap-4.1.final-0.alpha.rpm SPARC: rpm -Uvh ftp://ftp.redhat.com/updates/4.2/sparc/imap-4.1.final-0.sparc.rpm The Santa Cruz Operation, Inc. The following SCO products are vulnerable: - SCO UnixWare 7 SCO OpenServer 5.0, SCO CMW+ 3.0, SCO Open Desktop/Open Server 3.0, and UnixWare 2.1 is not vulnerable as University of Washington imapd is not included in these platforms. Binary versions of University of Washington imapd will be available shortly from the SCO ftp site: ftp://ftp.sco.com/SSE/sse014.ltr - cover letter ftp://ftp.sco.com/SSE/sse014.tar.Z - replacement binaries This fix is a binary for the following SCO operating systems: - SCO UnixWare 7 For the latest security bulletins and patches for SCO products, please refer to http://www.sco.com/security/. - -------------------------------------------------------------------------- The CERT Coordination Center thanks Olaf Kirch of Caldera Linux for discovering and reporting the vulnerability. Additionally, we would like to thank Mark Crispin and Lori Stevens of the University of Washington for providing technical details and support in the development of the advisory. - -------------------------------------------------------------------------- [ End CERT Advisory ] [ Start Sun Microsystems Advisory ] ________________________________________________________________________________ Sun Microsystems, Inc. Security Bulletin Bulletin Number: #00177 Date: October 21, 1998 Cross-Ref: CERT Advisory CA-98.09.imapd Title: IMAP ________________________________________________________________________________ The information contained in this Security Bulletin is provided "AS IS." Sun makes no warranties of any kind whatsoever with respect to the information contained in this Security Bulletin. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY WARRANTY OF NON-INFRINGEMENT OR IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE HEREBY DISCLAIMED AND EXCLUDED TO THE EXTENT ALLOWED BY APPLICABLE LAW. IN NO EVENT WILL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES HOWEVER CAUSED AND REGARDLESS OF ANY THEORY OF LIABILITY ARISING OUT OF THE USE OF OR INABILITY TO USE THE INFORMATION CONTAINED IN THIS SECURITY BULLETIN, EVEN IF SUN MICROSYSTEMS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. If any of the above provisions are held to be in violation of applicable law, void, or unenforceable in any jurisdiction, then such provisions are waived to the extent necessary for this disclaimer to be otherwise enforceable in such jurisdiction. ________________________________________________________________________________ 1. Bulletins Topics Sun announces the release of patches for Sun Internet Mail Server(tm) versions 3.2 and 2.0 which relate to a vulnerability in the IMAP server process. Sun recommends that you install the patches listed in section 4 immediately on systems using Sun Internet Mail Server(SIMS) 3.2 and 2.0. 2. Affected Supported Versions SIMS versions 3.2, 3.2_x86, 3.1, 3.1_x86, 2.0 and 2.0_x86 3. Understanding the Vulnerability Sun Internet Mail Server provides support for IMAP, POP and mailtool clients. The IMAP server available with certain versions of SIMS is vulnerable to the buffer overflows referenced in CERT Advisory CA-98.09. 4. List of Patches The following patches are available in relation to the above problem. SIMS Patch ID _____ _________ 3.2 105935-09 3.2_x86 105936-09 2.0 105346-07 2.0_x86 105347-07 Note: Sun recommends that sites using SIMS 3.1 or 3.1_x86 upgrade to 3.2 or 3.2_x86 and apply the corresponding patches referenced above. _______________________________________________________________________________ APPENDICES A. Patches listed in this bulletin are available to all Sun customers via World Wide Web at: B. Checksums for the patches listed in this bulletin are available via World Wide Web at: C. Sun security bulletins are available via World Wide Web at: D. Sun Security Coordination Team's PGP key is available via World Wide Web at: E. To report or inquire about a security problem with Sun software, contact one or more of the following: - Your local Sun answer centers - Your representative computer security response team, such as CERT - Sun Security Coordination Team. Send email to: security-alert@sun.com F. To receive information or subscribe to our CWS (Customer Warning System) mailing list, send email to: security-alert@sun.com with a subject line (not body) containing one of the following commands: Command Information Returned/Action Taken _______ _________________________________ help An explanation of how to get information key Sun Security Coordination Team's PGP key list A list of current security topics query [topic] The email is treated as an inquiry and is forwarded to the Security Coordination Team report [topic] The email is treated as a security report and is forwarded to the Security Coordination Team. Please encrypt sensitive mail using Sun Security Coordination Team's PGP key send topic A short status summary or bulletin. For example, to retrieve a Security Bulletin #00138, supply the following in the subject line (not body): send #138 subscribe Sender is added to our mailing list. To subscribe, supply the following in the subject line (not body): subscribe cws your-email-address Note that your-email-address should be substituted by your email address. unsubscribe Sender is removed from the CWS mailing list. ________________________________________________________________________________ Copyright 1998 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, Solaris and SunOS are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. This Security Bulletin may be reproduced and distributed, provided that this Security Bulletin is not modified in any way and is attributed to Sun Microsystems, Inc. and provided that such reproduction and distribution is performed for non-commercial purposes. [ End Sun Microsystems Advisory ] ______________________________________________________________________________ CIAC wishes to acknowledge the contributions of CERT 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 FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@llnl.gov For emergencies and off-hour assistance, DOE, DOE contractor sites, and the NIH may contact CIAC 24-hours a day. During off hours (5PM - 8AM PST), call the CIAC voice number 925-422-8193 and leave a message, or call 800-759-7243 (800-SKY-PAGE) to send a Sky Page. CIAC has two Sky Page PIN numbers, the primary PIN number, 8550070, is for the CIAC duty person, and the secondary PIN number, 8550074 is for the CIAC Project Leader. Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ (or http://ciac.llnl.gov -- they're the same machine) Anonymous FTP: ftp.ciac.org (or ciac.llnl.gov -- they're the same machine) Modem access: +1 (925) 423-4753 (28.8K baud) +1 (925) 423-3331 (28.8K baud) CIAC has several self-subscribing mailing lists for electronic publications: 1. CIAC-BULLETIN for Advisories, highest priority - time critical information and Bulletins, important computer security information; 2. SPI-ANNOUNCE for official news about Security Profile Inspector (SPI) software updates, new features, distribution and availability; 3. SPI-NOTES, for discussion of problems and solutions regarding the use of SPI products. Our mailing lists are managed by a public domain software package called Majordomo, which ignores E-mail header subject lines. To subscribe (add yourself) to one of our mailing lists, send the following request as the E-mail message body, substituting ciac-bulletin, spi-announce OR spi-notes for list-name: E-mail to ciac-listproc@llnl.gov or majordomo@tholia.llnl.gov: subscribe list-name e.g., subscribe ciac-bulletin You will receive an acknowledgment email immediately with a confirmation that you will need to mail back to the addresses above, as per the instructions in the email. This is a partial protection to make sure you are really the one who asked to be signed up for the list in question. If you include the word 'help' in the body of an email to the above address, it will also send back an information file on how to subscribe/unsubscribe, get past issues of CIAC bulletins via email, etc. 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) I-064: SGI IRIX mail(1), rmail(1M), sendmail(1M) Vulnerabilities I-065: SunOS ufsrestore Buffer Overflow Vulnerability I-066: Vulnerability in Some Implementations of PKCS#1 I-067: AutoStart 9805 Macintosh Worm Virus I-068: File Access Issue With Internet Information Server I-069: Buffer overflows in some POP servers I-070: Distributed DoS Attack Against NIS/NIS+ Networks I-071: OpenVMS loginout Vulnerability I-072: SunOS Solaris Vulnerabilities (libnsl, SUNWadmap) I-073: multiscan ('mscan') Tool