__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Stack Overflow in ToolTalk RPC Service November 20, 1998 17:00 GMT Number I-091 ______________________________________________________________________________ PROBLEM: A vulnerability has been identified in the ToolTalk object database server. PLATFORM: UNIX operating systems supporting CDE and some Open Windows installs. See vendor list below. DAMAGE: If exploited, this vulnerability may allow root access. SOLUTION: Apply patches or replace affected software. A temporary solution is to disable the ToolTalk database service. ______________________________________________________________________________ VULNERABILITY Risk is high. This vulnerability is being actively exploited. ASSESSMENT: ______________________________________________________________________________ [ Updated on February 19, 1999 with additional patch information from Silicon Graphics Inc. ] [ Start NAI Advisory ] Stack Overflow in ToolTalk RPC Service NAI Advisory 29 Network Associates, Inc. SECURITY ADVISORY August 31, 1998 SYNOPSIS An implementation fault in the ToolTalk object database server allows a remote attacker to run arbitrary code as the superuser on hosts supporting the ToolTalk service. The affected program runs on many popular UNIX operating systems supporting CDE and some Open Windows installs. This vulnerability is being actively exploited by attackers on the Internet. Confirmed Vulnerable Operating Systems and Third Party Vendors Sun Microsystems SunOS 5.6, 5.6_x86 SunOS 5.5.1, 5.5.1_x86 SunOS 5.5, 5.5_x86 SunOS 5.4, 5.4_x86 SunOS 5.3 SunOS 4.1. SunOS 4.1.3_U1 Hewlett Packard HP-UX release 10.10 HP-UX release 10.20 HP-UX release 10.30 HP-UX release 11.00 SGI IRIX 5.3 IRIX 5.4 IRIX 6.2 IRIX 6.3 IRIX 6.4 IBM AIX 4.1.X AIX 4.2.X AIX 4.3.X TriTeal TriTeal CDE - TED versions 4.3 and previous. Xi Graphics Xi Graphics Maximum CDE v1.2.3 It should be noted here that this not an exhaustive list of vulnerable vendors. These are only the *confirmed vulnerable* vendors. Also, any OS installation that is not configured to use or start up the ToolTalk service is not vulnerable to this problem. To determine whether the ToolTalk database server is running on a host, use the "rpcinfo" command to print a list of the RPC services running on it, as: $ rpcinfo -p hostname Because many operating systems do not include an entry for the ToolTalk database service in the RPC mapping table ("/etc/rpc" on most Unix platforms), the vulnerable service may not appear by name in the listing. The RPC program number for the ToolTalk database service is 100083. If an entry exists for this program, such as, 100083 1 tcp 692 then the service is running on the host. Until additional information is made available from the OS vendor, it should be assumed that the system is vulnerable to the attack described in this advisory. DETAILS The ToolTalk service allows independently developed applications to communicate with each other by exchanging ToolTalk messages. Using ToolTalk, applications can create open protocols which allow different programs to be interchanged, and new programs to be plugged into the system with minimal reconfiguration. The ToolTalk database server (rpc.ttdbserverd) is an ONC RPC service which manages objects needed for the operation of the ToolTalk service. ToolTalk-enabled processes communicate with each other using RPC calls to this program, which runs on each ToolTalk-enabled host. This program is a standard component of the ToolTalk system, which ships as a standard component of many commercial Unix operating systems. The ToolTalk database server runs as root. Due to an implementation fault in rpc.ttdbserverd, it is possible for a malicious remote client to formulate an RPC message that will cause the server to overflow an automatic variable on the stack. By overwriting activation records stored on the stack, it is possible to force a transfer of control into arbitrary instructions provided by the attacker in the RPC message, and thus gain total control of the server process. TECHNICAL DETAILS Source code and XDR specifications for the ToolTalk database protocol and server were not available at the time this advisory was drafted. What follows is information based on analysis of the rpc.ttdbserverd binary and a captured attack trace from a network on which an exploitation script for this problem was run. The observed attack utilized the ToolTalk Database (TTDB) RPC procedure number 7, with an XDR-encoded string as its sole argument. TTDB procedure 7 corresponds to the _tt_iserase_1() function symbol in the Solaris binary (/usr/openwin/bin/rpc.ttdbserverd). This function implements an RPC procedure which takes an ASCII string as an argument, which is treated as a pathname. The pathname string is passed to the function isopen(), which in turn passes it to _am_open(), then to _amopen(), _openfcb(), _isfcb_open(), and finally to _open_datfile(), where it, as the first argument to the function, is passed directly to a strcpy() to a pointer on the stack. If the pathname string is suitably large, the string overflows the stack buffer and overwrites an activation record, allowing control to transfer into instructions stored in the pathname string. RESOLUTION This is an implementation problem and can only be resolved completely by applying patches to or replacing affected software. As a temporary workaround, it is possible to eliminate vulnerability to this problem by disabling the ToolTalk database service. This can be done by killing the "rpc.ttdbserverd" process and removing it from any OS startup scripts. It should be noted that this may impair system functionality. The following vendors have been confirmed vulnerable, contacted, and have responded with repair information: Sun Microsystems Sun plans to release patches this week that relate to the ToolTalk vulnerability for SunOS 5.6, 5.6_x86, 5.5.1, 5.5.1_x86, 5.5 and 5.5_x86. Patches for SunOS 5.4, 5.4_x86, 5.3, 4.1.4 and 4.1.3_U1 will be released in about 4 weeks. Sun recommended security patches (including checksums) are available from: http://sunsolve.sun.com/sunsolve/pubpatches/patches.html Hewlett Packard HP-UX has been confirmed vulnerable in releases 10.XX and 11.00. HP has made patches available with the following identifications: HP-UX release 10.10 HP9000 Series 7/800 PHSS_16150 HP-UX release 10.20 HP9000 Series 7/800 PHSS_16147 HP-UX release 10.30 HP9000 Series 7/800 PHSS_16151 HP-UX release 11.00 HP9000 Series 7/800 PHSS_16148 IBM IBM AIX has been confirmed vulnerable. IBM's response is as follows: The version of ttdbserver shipped with AIX is vulnerable. We are currently working on the following fixes which will be available soon: APAR 4.1.x: IX81440 APAR 4.2.x: IX81441 APAR 4.3.x: IX81442 Until the official APARs are available, a temporary fix can be downloaded via anonymous ftp from: ftp://aix.software.ibm.com/aix/efixes/security/ttdbserver.tar.Z TriTeal An official response from TriTeal is as follows: The ToolTalk vulnerability will be fixed in the TED4.4 release. For earlier versions of TED, please contact the TriTeal technical support department at support@triteal.com or at http://www.triteal.com/support. Xi Graphics An official response from Xi Graphics is as follows: Xi Graphics Maximum CDE v1.2.3 is vulnerable to this attack. A patch to correct this problem will be placed on our FTP site by 8/28/1998: * ftp://ftp.xig.com:/pub/updates/cde/1.2.3/C1203.002.tar.gz * ftp://ftp.xig.com:/pub/updates/cde/1.2.3/C1203.002.txt Users of Maximum CDE v1.2.3 are urged to install this update. Silicon Graphics The Security Labs team at Network Associates has confirmed that SGI IRIX 6.3 is vulnerable to this attack. SGI's security team has been contacted and informed of the vulnerability. No repair information has been made available from Silicon Graphics regarding this problem. Other Vendors If any uncertainty exists with regards to whether a given vendor not listed in this advisory is vulnerable to this attack, we recommend contacting them via their support/security channels for more information. ACKNOWLEDGEMENTS The NAI Security Labs Team would like to thank the HP & IBM Security Response Teams, CERT/CC & AUSCERT for their contributions to this advisory. ABOUT THE NETWORK ASSOCIATES SECURITY LABS The Security Labs at Network Associates hosts some of the most important research in computer security today. With over 28 published security advisories published in the last 2 years, the Network Associates security auditing teams have been responsible for the discovery of many of the Internet's most serious security flaws. This advisory represents our ongoing commitment to provide critical information to the security community. For more information about the Security Labs at Network Associates, see our website at http://www.nai.com or contact us at seclabs@nai.com. [ End NAI Advisory ] [ Start Silicon Graphics Advisory ] -----BEGIN PGP SIGNED MESSAGE----- ______________________________________________________________________________ Silicon Graphics Inc. Security Advisory Title: Vulnerability in ToolTalk RPC Service Title: NAI-29, CERT CA-98.11 Number: 19981101-01-PX Date: February 19, 1999 ______________________________________________________________________________ Silicon Graphics provides this information freely to the SGI user community for its consideration, interpretation, implementation and use. Silicon Graphics recommends that this information be acted upon as soon as possible. Silicon Graphics provides the information in this Security Advisory on an "AS-IS" basis only, and disclaims all warranties with respect thereto, express, implied or otherwise, including, without limitation, any warranty of merchantability or fitness for a particular purpose. In no event shall Silicon Graphics be liable for any loss of profits, loss of business, loss of data or for any indirect, special, exemplary, incidental or consequential damages of any kind arising from your use of, failure to use or improper use of any of the instructions or information in this Security Advisory. ______________________________________________________________________________ - ----------------------- - --- Issue Specifics --- - ----------------------- The rpc.ttdbserverd(8) service is an RPC based daemon which is called to service requests for the ToolTalk databases stored on the host. Unfortunately, a vulnerability in the rpc.ttdbserverd(8) daemon has been discovered which can lead to a root compromise of the system. Silicon Graphics Inc. has investigated the issue and recommends the following steps for neutralizing the exposure. It is HIGHLY RECOMMENDED that these measures be implemented on ALL vulnerable SGI systems. This issue has been corrected in future releases of IRIX. - -------------- - --- Impact --- - -------------- The rpc.ttdbserverd(8) daemon is installed by default on IRIX. ??? A local user account is not needed to exploit the rpc.ttdbserverd(8) daemon. The vulnerability can be exploited remotely by using carefully crafted RPC packets that are sent to the rpc.ttdbserverd(8) daemon. The exploitable stack overflow vulnerability can lead to a root compromise. This rpc.ttdbserverd(8) daemon stack overflow vulnerability was reported by NAI Advisory 29 and CERT Advisory CA-98.11. This rpc.ttdbserverd(8) daemon vulnerability has been publicly discussed in Usenet newsgroups and mailing lists. - -------------------------- - --- Temporary Solution --- - -------------------------- Although patches are available for this issue, it is realized that there may be situations where installing the patches immediately may not be possible. The steps below can be used to disable the ttdbserverd(8) daemon. ================= **** WARNING **** ================= Disabling ttdbserverd(8) daemon will impact and/or disable applications that use the RPC-based ToolTalk database server. One such third-party application is the TriTeal CDE product. 1) Become the root user on the system. % /bin/su - Password: # 2) Verify ttdbserverd(8) daemon is enabled. # rpcinfo -p | grep 100083 100083 1 tcp 1028 ttdbserverd 3) Edit the file /etc/inetd.conf (for IRIX 5.3 and lower, edit /usr/etc/inetd.conf). Place a "#" as the first character of the line to comment out and deactivate the ttdbserverd daemon. # vi /etc/inetd.conf {Find the following line} ttdbserverd/1 stream rpc/tcp wait root \ ?/usr/etc/rpc.ttdbserverd rpc.ttdbserverd {Place a "#" as the first character of the ttdbserverd line} #ttdbserverd/1 stream rpc/tcp wait root \ ?/usr/etc/rpc.ttdbserverd rpc.ttdbserverd 4) Force inetd to re-read the configuration file. # /etc/killall -HUP inetd 5) Kill any existing ttdbserverd(8) process. # /etc/killall ttdbserverd 6) Return to previous level. # exit % - ---------------- - --- Solution --- - ---------------- OS Version Vulnerable? Patch # Other Actions ---------- ----------- ------- ------------- IRIX 3.x unknown Note 1 & 2 IRIX 4.x unknown Note 1 & 2 IRIX 5.0.x-5.2 unknown Note 1 & 2 IRIX 5.3 yes 3510 Note 1 & 2 IRIX 6.0.x unknown Note 1 & 2 IRIX 6.1 unknown Note 1 & 2 IRIX 6.2 yes 3511 Note 2 IRIX 6.3 yes 3511 Note 2 & 3 IRIX 6.4 yes 3511 Note 2 & 3 IRIX 6.5 yes 3511 Note 2 IRIX 6.5.1 yes 3511 Note 2 & 4 IRIX 6.5.2 yes 3511 Note 2 & 4 IRIX 6.5.3 no NOTES 1) Upgrade to currently supported IRIX operating system. See http://support.sgi.com/news/irix2.html for more information. 2) See "Temporary Solution" section. 3) This version of the IRIX operating system is in maintenance mode and patches will no longer be produced when it retires. See http://support.sgi.com/news/irix1.html for more information. 4) If you have not received an IRIX 6.5.3m CD for IRIX 6.5, contact your SGI Support Provider or download the IRIX 6.5.3 Maintenance Release Stream from http://support.sgi.com/ or ftp://support.sgi.com/ Patches are available via anonymous FTP and your service/support provider. The primary SGI anonymous FTP site for security information and patches is sgigate.sgi.com (204.94.209.1). Security information and patches can be found in the ~ftp/security and ~ftp/patches directories, respectively. For security and patch management reasons, ftp.sgi.com (mirror of sgigate) lags behind and does not do a real-time update of ~ftp/security and ~ftp/patches ##### Patch File Checksums #### The actual patch will be a tar file containing the following files: Filename: README.patch.3510 Algorithm #1 (sum -r): 18621 8 README.patch.3510 Algorithm #2 (sum): 44666 8 README.patch.3510 MD5 checksum: 4B4385225DD2B2EABD7A0C4B60F5009D Filename: patchSG0003510 Algorithm #1 (sum -r): 03265 1 patchSG0003510 Algorithm #2 (sum): 29249 1 patchSG0003510 MD5 checksum: D185F8A457F0BF6B01334861404715B7 Filename: patchSG0003510.idb Algorithm #1 (sum -r): 53417 1 patchSG0003510.idb Algorithm #2 (sum): 36974 1 patchSG0003510.idb MD5 checksum: E4340D6B09805EDB36DC90CF7A4EACE2 Filename: patchSG0003510.sw Algorithm #1 (sum -r): 36411 344 patchSG0003510.sw Algorithm #2 (sum): 28013 344 patchSG0003510.sw MD5 checksum: C3F37AF4BCD55BFE2AB14C8235139921 Filename: README.patch.3511 Algorithm #1 (sum -r): 37150 8 README.patch.3511 Algorithm #2 (sum): 48409 8 README.patch.3511 MD5 checksum: 582BED4D899C553F5B278348EF519214 Filename: patchSG0003511 Algorithm #1 (sum -r): 40672 2 patchSG0003511 Algorithm #2 (sum): 54170 2 patchSG0003511 MD5 checksum: F42EF845B4915F3B76F7CFBCDB946B37 Filename: patchSG0003511.ToolTalk_man Algorithm #1 (sum -r): 10831 6 patchSG0003511.ToolTalk_man Algorithm #2 (sum): 19356 6 patchSG0003511.ToolTalk_man MD5 checksum: 0DBCB57A06917234FBA12BE321306801 Filename: patchSG0003511.ToolTalk_sw Algorithm #1 (sum -r): 12043 322 patchSG0003511.ToolTalk_sw Algorithm #2 (sum): 3866 322 patchSG0003511.ToolTalk_sw MD5 checksum: AD65C6EDCD13FF99F9D2E6912E8EFE72 Filename: patchSG0003511.idb Algorithm #1 (sum -r): 55405 1 patchSG0003511.idb Algorithm #2 (sum): 40096 1 patchSG0003511.idb MD5 checksum: EF6CD99C919F2207E697F074F6FDF0BD - ------------------------ - --- Acknowledgments --- - ------------------------ Silicon Graphics wishes to thank the Network Associates, Inc., CERT Coordination Center and the users of the Internet Community at large for their assistance in this matter. - ----------------------------------------------------------- - --- Silicon Graphics Inc. Security Information/Contacts --- - ----------------------------------------------------------- If there are questions about this document, email can be sent to cse-security-alert@sgi.com. ------oOo------ Silicon Graphics provides security information and patches for use by the entire SGI community. This information is freely available to any person needing the information and is available via anonymous FTP and the Web. The primary SGI anonymous FTP site for security information and patches is sgigate.sgi.com (204.94.209.1). Security information and patches are located under the directories ~ftp/security and ~ftp/patches, respectively. The Silicon Graphics Security Headquarters Web page is accessible at the URL http://www.sgi.com/Support/security/security.html. For issues with the patches on the FTP sites, email can be sent to cse-security-alert@sgi.com. For assistance obtaining or working with security patches, please contact your SGI support provider. ------oOo------ Silicon Graphics provides a free security mailing list service called wiretap and encourages interested parties to self-subscribe to receive (via email) all SGI Security Advisories when they are released. Subscribing to the mailing list can be done via the Web (http://www.sgi.com/Support/security/wiretap.html) or by sending email to SGI as outlined below. % mail wiretap-request@sgi.com subscribe wiretap end ^d In the example above, is the email address that you wish the mailing list information sent to. The word end must be on a separate line to indicate the end of the body of the message. The control-d (^d) is used to indicate to the mail program that you are finished composing the mail message. ------oOo------ Silicon Graphics provides a comprehensive customer World Wide Web site. This site is located at http://www.sgi.com/Support/security/security.html. ------oOo------ For reporting *NEW* SGI security issues, email can be sent to security-alert@sgi.com or contact your SGI support provider. A support contract is not required for submitting a security report. ______________________________________________________________________________ This information is provided freely to all interested parties and may be redistributed provided that it is not altered in any way, Silicon Graphics is appropriately credited and the document retains and includes its valid PGP signature. -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBNs3qwbQ4cFApAP75AQHMqgQAkl7o4iJdHAW7fk3UwPE9CRIEAVRlI3yA GrpC1I6vf92KVIdhGvXZq1xldmkj0HK2MpiyUQbr0IKNGQSgcDVJP86pgX3MHE8m bU/Yy47ycxhFMQ67k1fpXmGFvLGHE3nfTJOlG6tvMa66jDzk9uZCOFA16CE0Mmj4 fQF7JLleETA= =soH3 -----END PGP SIGNATURE----- [ End Silicon Graphics Advisory ] ______________________________________________________________________________ CIAC wishes to acknowledge the contributions of Network Associates 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-081: HP-UX & MPEix Predictive Vulnerability I-082: HP-UX Netscape Servers Vulnerability I-083: Eudora Pro E-Mail Attachment Vulnerability I-084: Cisco IOS Remote Router Crash I-085: Microsoft IE Upgrade Trojan Horse Program I-086: Cisco CRM Temporary File Vulnerability I-087: Microsoft PPTP Security Vulnerabilities I-088: NFS clients rpc.pcnfsd Vulnerability I-089: SGI Seyon Security Vulnerability I-090: HP-UX dtmail/rpc.ttdbserverd Vulnerability -----BEGIN PGP SIGNATURE----- Version: 4.0 Business Edition iQCVAwUBNfmBP7nzJzdsy3QZAQF1JwQAionmNVsMjDWTBfInKglWiQXC7nivA+Uf NdToicitnTdL9hOSiTY5S+EpePc+JwbBI5VwnjNFSRvK4mxsO0SAAegNshXKrCB9 KZ+hL/qOv24S3pZhCb8oCpNoUM+tvKgoXpoV5lfmL6clkVm/bIYvWyh0xY/2WAb2 uwmwRxNZ6Gs= =co/X -----END PGP SIGNATURE-----