search menu icon-carat-right cmu-wordmark

CERT Coordination Center

SGI systems may execute commands embedded in mail messages

Vulnerability Note VU#17215

Original Release Date: 2001-04-13 | Last Revised: 2001-08-10

Overview

Some SGI systems produced circa 1998 allowed an intruder to send mail that would execute commands when the reader opened the message.

Description

On some SGI systems, Netscape is bundled with IRIX 6.3 and 6.4 and is used as the default web browser and mail reader. On these systems, the mailcap file has been extended to include the line

application/x-sgi-exec; /usr/sysadm/bin/runexec %s; \
description="System Administration Executable"


application/x-sgi-task; /usr/sysadm/bin/runtask %s; \
description="System Administration Task"


The mailcap file is an association between content-type specifications and programs or commands to interpret those types. The system mailcap file usually resides in /etc/mailcap, /usr/etc/mailcap, or /usr/local/etc/mailcap; however, the location of the mailcap file is configurable by system administrators. Additionally, individuals can have their own mailcap file in $HOME/.mailcap. The entries in users' personal mailcap file will override the entries in the system mailcap file on an entry-by-entry basis. That is, the effective mapping of content-types to programs is the combination of the system mailcap file and the user's own mailcap file. In the case of a conflict, the user's own mailcap file has precedence.

Although this description necessarily mentions Netscape Communicator, the vulnerability does not lie with Communicator. Any program that obeys the mailcap file, including metamail and programs that use metamail to provide MIME functionality, can be used to exploit this vulnerability. Netscape is mentioned because vulnerable systems ship with Netscape installed as the default mail reader and web browser.

Impact

Intruders may be able to execute arbitrary commands on vulnerable systems by inducing a victim to read appropriately crafted email messages and web pages. If privileged users use a vulnerable mail system to read a mail, an intruder may be able to gain root access.

Solution

Modify the mailcap file to remove the runexec and runtask associations.
Don't enable javascript by default.

Vendor Information

17215
 

SGI Affected

Updated:  April 13, 2001

Status

Affected

Vendor Statement

______________________________________________________________________________
               Silicon Graphics Inc. Security Advisory

       Title:   IRIX 6.3 & 6.4 mailcap vulnerability
       Number:  19980403-01-PX
       Date:    April 2, 1998
______________________________________________________________________________

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 System Manager sysmgr(1M) provides a web-browser-like GUI interface to
tasks that help you administer an SGI workstation. sysmgr(1M) uses multiple
tools to manage its GUI interface, two of them being runtask(1M) and
runexec(1M).

By mimicking the descriptor files of runtask(1M) or runexec(1M), an SGI user
browsing web pages or reading email can inadvertently download a
"trojan horse" runtask(1M) or runexec(1M) descriptor file. The "trojan horse"
descriptor file will execute a local System Manager Task with the privileges
of the user web browsing and can lead to a local root compromise.

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 will be corrected in future releases of IRIX.


- - --------------
- - --- Impact ---
- - --------------

All IRIX 6.3/6.4 users that have Mailcap entries for x-sgi-task
and x-sgi-exec have this vulnerability. On IRIX 6.3/6.4, these vulnerable
Mailcap entries are installed by default in /usr/local/lib/netscape/mailcap .
Users can add their own Mailcap entries in their home directories
($HOME/.mailcap) and these need to be inspected for the vulnerable x-sgi-task
and x-sgi-exec entries.

By default, this vulnerability requires an IRIX 6.3/6.4 user to use
Netscape Navigator to web browse or read email from a malicious site
and download a "trojan horse" System Manager Task which will execute
locally with the privileges of the user web browsing. If the user is a
privileged or root user, the "trojan horse" System Manger Task will execute
with root privileges and can lead to a root compromise.


- - --------------------------
- - --- 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.


    1) Become the root user on the system.

               % /bin/su -
               Password:
               #

    2) Edit the default Mailcap file.

               # vi /usr/local/lib/netscape/mailcap

    3) Remove the following vulnerable mailcap entries:

               application/x-sgi-task; /usr/sysadm/bin/runtask %s; \
                   description="System Administration Task"

               application/x-sgi-exec; /usr/sysadm/bin/runexec %s; \
                   description="System Administration Executable"

    4) Find any additional mailcap files and remove any vulnerable entries.

       You will need to run the find(1) command on each system you
       maintain because the command examines files on local disks only.

       Note that this is one long command, though we have separated it
       onto three lines using backslashes.

                # find / -local -type f  -name 'mailcap'  -o \
                  -name '.mailcap' -exec egrep 'runexec|runtask' {} \
                  /dev/null \;

       This command will find all files on a system that:
           are only in the local file system (/ -local)
           are regular files (-type f)
           have the name "mailcap" (-name 'mailcap') or the name ".mailcap"

       Once found, those files will be searched for the string "runexec" or
       "runtask" (-exec egrep 'runexec|runtask' {}) and have their path names
       printed .

       The addition of /dev/null as an argument causes grep to list the
       full pathname of any file containing the string, rather than just the
       basename.

       Edit the files that have the pathnames printed and remove any
       vulnerable runtask/runexec mailcap entries.

     5) Return to previous level.

               # exit
               $


- - ----------------
- - --- Solution ---
- - ----------------

  OS Version     Vulnerable?     Patch #      Other Actions
  ----------     -----------     -------      -------------

  IRIX 3.x          no
  IRIX 4.x          no
  IRIX 5.0.x        no
  IRIX 5.1.x        no
  IRIX 5.2          no
  IRIX 5.3          no
  IRIX 6.0.x        no
  IRIX 6.1          no
  IRIX 6.2          no
  IRIX 6.3          yes           2336
  IRIX 6.4          yes           2339

Patches are available via anonymous FTP and your service/support provider.

The SGI anonymous FTP site is sgigate.sgi.com (204.94.209.1) or its
mirror, ftp.sgi.com.   Security information and patches can be found
in the ~ftp/security and ~ftp/patches directories, respectfully.



                ##### Patch File Checksums ####

The actual patch will be a tar file containing the following files:

Filename:                 README.patch.2336
Algorithm #1 (sum -r):    15417 8 README.patch.2336
Algorithm #2 (sum):       21104 8 README.patch.2336
MD5 checksum:             C5FCA39F205EF1C306F28E95C811150C

Filename:                 patchSG0002336
Algorithm #1 (sum -r):    64988 2 patchSG0002336
Algorithm #2 (sum):       38657 2 patchSG0002336
MD5 checksum:             C38D6B81878377F470D1CC0ED43C8227

Filename:                 patchSG0002336.idb
Algorithm #1 (sum -r):    05931 2 patchSG0002336.idb
Algorithm #2 (sum):       54651 2 patchSG0002336.idb
MD5 checksum:             0C821C1BC07C08F279288F86E9807C93

Filename:                 patchSG0002336.netscape_gold_sw
Algorithm #1 (sum -r):    52912 20 patchSG0002336.netscape_gold_sw
Algorithm #2 (sum):       51500 20 patchSG0002336.netscape_gold_sw
MD5 checksum:             88CABDD9E4669CC6303876D77E491E4F

Filename:                 README.patch.2339
Algorithm #1 (sum -r):    11695 8 README.patch.2339
Algorithm #2 (sum):       21823 8 README.patch.2339
MD5 checksum:             114563D0D67F80E371C71EF3E6262900

Filename:                 patchSG0002339
Algorithm #1 (sum -r):    37814 2 patchSG0002339
Algorithm #2 (sum):       40753 2 patchSG0002339
MD5 checksum:             E0B519F8ECD83396E29DFE07DF23517E

Filename:                 patchSG0002339.idb
Algorithm #1 (sum -r):    59311 2 patchSG0002339.idb
Algorithm #2 (sum):       54667 2 patchSG0002339.idb
MD5 checksum:             8E39530FD44C9087F0C07B1F75043764

Filename:                 patchSG0002339.netscape_gold_sw
Algorithm #1 (sum -r):    39233 20 patchSG0002339.netscape_gold_sw
Algorithm #2 (sum):       53498 20 patchSG0002339.netscape_gold_sw

MD5 checksum:             7FF56E22472B0797499920BAAB8CA9C5


- - - ------------------------
- - - --- Acknowledgments ---
- - - ------------------------

Silicon Graphics wishes to thank the CERT Coordination Center, and
AUSCERT 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 <YourEmailAddress>
end
^d

In the example above, <YourEmailAddress> 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.

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.

Addendum

The CERT/CC has no additional comments at this time.

If you have feedback, comments, or additional information about this vulnerability, please send us email.


CVSS Metrics

Group Score Vector
Base
Temporal
Environmental

References

Acknowledgements

Our thanks to Karl Stiefvater who reported this vulnerability to us.

This document was written by Shawn V. Hernan.

Other Information

CVE IDs: None
Severity Metric: 65.81
Date Public: 1998-04-02
Date First Published: 2001-04-13
Date Last Updated: 2001-08-10 15:05 UTC
Document Revision: 10

Sponsored by CISA.