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.26 -- HP-UX cue Vulnerability

Date: 04 September 1997

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

===========================================================================
AA-97.26                        AUSCERT Advisory
                            HP-UX cue Vulnerability 
                                4 September 1997

Last Revised: --

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

AUSCERT has received information that a vulnerability exists in the HP-UX
program cue(1).

This vulnerability may allow local users to gain root privileges.

Exploit information involving this vulnerability has been made publicly
available.

At this stage, AUSCERT is unaware of any official vendor patches.  AUSCERT
recommends that sites apply the workaround given in Section 3 until vendor
patches are made available.

This advisory will be updated as more information becomes available.

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

1.  Description

    The HP-UX cue(1) program is used to start the Character-Terminal User
    Environment (CUE) for users.  cue is often started from cuegetty(1M)
    but may also be started from the command line or via a user's
    initialisation script (for example, .login).

    It has been discovered that cue creates files in an insecure manner.
    As this program is setuid root, it may be possible for local users to
    create or overwrite arbitrary files on the system.

    Exploit information involving this vulnerability has been made publicly
    available.

    cue is installed by default in /usr/bin/cue under HP-UX 9.x and 10.x
    on Series 800 machines.  Although cue should only be installed on
    Series 800 machines, sites are encouraged to check for its presence
    on all machines running HP-UX and, if found, implement workarounds
    given in Section 3.

2.  Impact

    Local users may be able to create or over-write arbitrary files on
    the system.  This can be leveraged to gain root privileges.

3.  Workarounds/Solution

    AUSCERT recommends that sites prevent the exploitation of the
    vulnerability in cue by immediately applying the workaround given in
    Section 3.1.

    If the functionality provided by CUE is required for a small set of
    trusted users, AUSCERT recommends that access to the cue program be
    restricted to this group as described in Section 3.2.

    Hewlett Packard has informed AUSCERT that they are aware of this
    problem and a resolution is in progress.  AUSCERT recommends that
    official vendor patches be installed when they are made available.

3.1 Remove setuid and execute permissions

    Until official vendor patches are made available, sites should remove
    the setuid root and execute permissions from cue.  To do this, the
    following command should be run as root:

        # chmod 400 /usr/bin/cue
        # ls -l /usr/bin/cue
        -r--------   1 root bin    1564672 Jun 10 1996 /usr/bin/cue

    Note that this will remove the ability for any user to run this
    program.  

3.2 Restrict access

    If the functionality provided by the cue program is required by a
    small set of trusted users, sites may wish to restrict the execution
    of cue to that group of users.  For example, if the Unix group
    "trusted" exists and contains only those users allowed to use cue,
    the following commands will restrict its use:

       # chgrp trusted /usr/bin/cue
       # chmod 4750 /usr/bin/cue
       # ls -l /usr/bin/cue
       -rwsr-x---   1 root    trusted   1564672 Jun 10  1996 /usr/bin/cue

    Access to any account in the "trusted" group will allow vulnerable
    versions of cue to be exploited.

4.  Additional measures

4.1 Check old patch directories

    During the installation of HP-UX patches, copies of files being
    replaced are saved in case the patches need to be uninstalled.  The
    original versions of patched files are stored in the following
    locations:

        HP-UX 9.x:      /system/<PATCH-NAME>/orig/
        HP-UX 10.x:     /var/adm/sw/patch/PATCH_NAME>/

    If patches for vulnerable programs have been previously installed,
    copies of the vulnerable programs may be available in the above
    locations.  Sites should ensure the directories have permissions which
    restrict access to the patch areas.

4.2 Remove unnecessary setuid/setgid programs

    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 ) -type f -exec ls -l {} ;

    It is AUSCERT's experience that many vulnerabilities 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 cue program is
    not needed by most sites.  If sites had previously disabled the
    cue program, they would not have been vulnerable to this latest
    exploit.

- ---------------------------------------------------------------------------
AUSCERT thanks Hewlett-Packard for their continued assistance and technical
expertise essential for the production of this advisory.  AUSCERT also
thanks Information Technology Services of the University of Southern
Queensland for their assistance.
- ---------------------------------------------------------------------------

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


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

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

iQCVAwUBNA6MNCh9+71yA2DNAQFIRwQAhxwzyxz+ILt8ZOiur+Ln6l+14wWviBpF
HSR9d+NPmo2Xcg1ga5d28e3MgGQm7zMLqHbREWDjCRk2SLdcQiUz9cP6gI2KLize
XKfkfPW8uVxGyqClTluL/a6Zw5wQ+zh6qA3XeOzpRmmeFXUHu4/FOIj+mRbfninp
dEGCVTk+EwE=
=7z5/
-----END PGP SIGNATURE-----