copyright | disclaimer | privacy | contact  
Australia's Leading Computer Emergency Response Team
 
Search this site

 
On this site

 > HOME
 > About AusCERT
 > Membership
 > Contact Us
 > PKI Services
 > Training
 > Publications
 > Sec. Bulletins
 > Conferences
 > News & Media
 > Services
 > Web Log
 > Site Map
 > Site Help
 > Member login





 

AA-97.05 -- SGI IRIX startmidi/stopmidi Vulnerability

Date: 20 March 1998

Click here for printable version
Click here for PGP verifiable version
-----BEGIN PGP SIGNED MESSAGE-----

===========================================================================
AA-97.05                        AUSCERT Advisory
                   SGI IRIX startmidi/stopmidi Vulnerability
                                11 February 1997

Last Revised: 20 March 1998
              Changed Section 3 to include vendor patch and bulletin
              information.

              A complete revision history is at the end of this file.

- ---------------------------------------------------------------------------

AUSCERT has received information that a vulnerability exists in the
startmidi(1)/stopmidi(1) program which is part of the SGI IRIS Digital
Media Execution Environment.

This vulnerability may allow local users to gain root privileges or
perform a denial of service attack.

Exploit information has been made publicly available.

Vendor patches have been released addressing this vulnerability.

AUSCERT recommends that sites take the steps outlined in section 3 as
soon as possible.

This advisory will be updated as more information becomes available.

- ---------------------------------------------------------------------------

1.  Description

    The SGI IRIS Digital Media Execution Environment contains the basic
    system components necessary to support audio, MIDI (Musical Instrument
    Digital Interface), and video applications on an IRIS workstation.
    One part of this product is the MIDI Execution Environment, which
    among other things, contains the startmidi/stopmidi program.  stopmidi
    is a symbolic link to the startmidi program.

    Before any MIDI applications can be run, it is usually necessary to
    configure the serial ports for use with MIDI.  startmidi initializes
    the serial ports and links them to the MIDI streams driver. stopmidi
    disables MIDI on the specified device.

    During the execution of startmidi, files are created in an insecure
    manner with insecure permissions.  As this program executes with root
    privileges, it is possible for local users to create or truncate
    arbitrary files on the system.  It also possible to alter the contents
    of these temporary files, which may allow users to perform a denial
    of service attack.

    Exploit information has been made publicly available.

    The default location for startmidi/stopmidi is /usr/sbin/.

    IRIX 5.x and 6.x systems, loaded with Digital Media Tools by default,
    are known to contain this vulnerability.  Sites can determine the
    version of the operating system with the command:

	% /sbin/uname -a

2.  Impact

    Local users may be able to create or truncate arbitrary files on
    the system, which may be leveraged to gain root access.  They may
    also be able to change the contents of temporary files, allowing a
    denial of service attack.

3.  Workarounds/Solution

    Official vendor patches have been released by Silicon Graphics which   
    address this vulnerability (Section 3.2).

    If the patches recommended by Silicon Graphics cannot be applied,
    AUSCERT recommends that sites prevent the exploitation of this
    vulnerability by immediately applying the workaround given in Section
    3.1.  If the MIDI Execution Environment is not required, it is
    recommended that sites remove it from their systems (Section 3.3).

3.1 Remove setuid and execute permissions

    To prevent the exploitation of the vulnerability described in this
    advisory, sites should remove the setuid root and execute permissions
    from startmidi.  To do this, the following command should be run as
    root:

        # /bin/chmod 400 /usr/sbin/startmidi
        # /bin/ls -l /usr/sbin/startmidi
        -r--------   1 root   sys   18608 Nov 22  1994 /usr/sbin/startmidi

    Note that this will remove the ability for any user to run the
    startmidi or stopmidi program.  If only the setuid permissions are
    removed, it is still possible for users to gain privileges when
    startmidi is executed by the root user.

3.2 Install vendor patches
    
    Silicon Graphics has released a security bulletin containing
    information about and patch details for similar vulnerabilities
    affecting a number of related programs including startmidi. The
    original release of this bulletin can be retrieved from:
    
        ftp://sgigate.sgi.com/security/19980301-01-PX
    
    Information on patches which address the vulnerability described in
    this advisory has been extracted from the SGI bulletin and is listed
    below.
    
       OS Version     Vulnerable?     Patch #      Other Actions
       ----------     -----------     -------      -------------
    
       IRIX 3.x          no
       IRIX 4.x          no
       IRIX 5.0.x        yes          not avail    Note 1
       IRIX 5.1.x        yes          not avail    Note 1
       IRIX 5.2          yes          not avail    Note 1
       IRIX 5.3          yes          2563
       IRIX 6.0.x        yes          not avail    Note 1
       IRIX 6.1          yes          not avail    Note 1
       IRIX 6.2          yes          2564
       IRIX 6.3          yes          2565
       IRIX 6.4          yes          2291


       NOTES
    
         1) upgrade operating system or see "Temporary Solution" section.
    
    "Temporary Solution" refers to the SGI bulletin but is equivalent to
    the suggestions given in our AUSCERT advisory in section 3.1.
    
    These patches can be retrieved from:

        ftp://sgigate.sgi.com/patches/

3.3 Remove the MIDI Execution Environment

    If the  MIDI Execution Environment is no longer needed, sites are
    encouraged to remove it completely from their systems.  This can be
    done by running, as root, the GUI software management tool, swmgr, or
    the command:

        # /usr/sbin/versions remove dmedia_eoe.sw.midi

    Sites can check that the package has been removed with the command:
        
        # /usr/sbin/versions dmedia_eoe.sw.midi

4.  Additional measures

    Most Unix systems ship with numerous programs which have setuid or
    setgid privileges.  Often the functionality supplied by these
    privileged programs is not required by many sites.  The large number
    of privileged programs that are shipped by default are to cater for
    all possible uses of the system.

    AUSCERT encourages sites to examine all the setuid/setgid programs
    and determine the necessity of each program.  If a program does not
    absolutely require the setuid/setgid privileges to operate (for
    example, it is only run by the root user),  the setuid/setgid
    privileges should be removed.  Furthermore, if a program is not
    required at your site, then all execute permissions should be removed.

    A sample command to find all setuid/setgid programs is (run as root):

       # find / ( -perm -4000 -o -perm -2000 ) -exec ls -ld {} ;

    It is AUSCERT's experience that many vulnerability are being
    discovered in setuid/setgid programs which are not necessary for the
    correct operation of most systems.  Sites can increase their security
    by removing unnecessary setuid/setgid programs.

    For example, the functionality provided by the startmidi/stopmidi
    program is not needed by most sites.  If sites had previously disabled
    this program, they would not have been susceptible to this latest
    vulnerability.

- ---------------------------------------------------------------------------
AUSCERT thanks Silicon Graphics Inc. for their technical assistance in
this matter.
- ---------------------------------------------------------------------------

The AUSCERT team have made every effort to ensure that the information
contained in this document is accurate.  However, the decision to use the
information described is the responsibility of each user or organisation.
The appropriateness of this document for an organisation or individual
system should be considered before application in conjunction with local
policies and procedures.  AUSCERT takes no responsibility for the
consequences of applying the contents of this document.

If you believe that your system has been compromised, contact AUSCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

AUSCERT is located at The University of Queensland within the Prentice
Centre.  AUSCERT is a full member of the Forum of Incident Response and
Security Teams (FIRST).

AUSCERT maintains an anonymous FTP service which is found on:
ftp://ftp.auscert.org.au/pub/.  This archive contains past SERT and AUSCERT
Advisories, and other computer security information.

AUSCERT also maintains a World Wide Web service which is found on:
http://www.auscert.org.au/.

Internet Email: auscert@auscert.org.au
Facsimile:	(07) 3365 4477
Telephone:	(07) 3365 4417 (International: +61 7 3365 4417)
		AUSCERT personnel answer during Queensland business hours
		which are GMT+10:00 (AEST).
		On call after hours for emergencies.

Postal:
Australian Computer Emergency Response Team
Prentice Centre
Brisbane
Qld.  4072.
AUSTRALIA


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Revision History

20 March 1998 Silicon Graphics has released a security bulletin
              addressing the vulnerability described in this advisory.
              Section 3 has been modified to include vendor patch
              information.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key

iQCVAwUBNRKGFCh9+71yA2DNAQElUQP/ZH9vLJzfBaYbHBluofAZoQlLMOxtiany
fq+kmoC4d4/3SVmUZe+2Cfc9RwSR/2toR2ldARsNAozeYEZfsNDWRV/LTPyFaK0y
aLhJJgu/zinSKdGMAqvF1BjpnQabyIx0aIViDhfbQqDggoHf/GFCAdjIfygfrCRV
B4yxZjzI7r0=
=UDtV
-----END PGP SIGNATURE-----