-----BEGIN PGP SIGNED MESSAGE-----

===========================================================================
              AUSCERT External Security Bulletin Redistribution
                             
      ESB-1999.092 -- HEWLETT-PACKARD SECURITY BULLETIN: HPSBUX9907-100
                  CDE Leaves Current Directory in root PATH
                                09 July 1999

===========================================================================

Hewlett-Packard has released the following bulletin concerning a
vulnerability in CDE running on HP 9000 series 700/800 at hp-ux
revision 10.X systems.  Root user's PATH is left with 'current
directory' in it after logging in using CDE.  This vulnerability
could allow users to gain unauthorised elevated privileges.


- --------------------------BEGIN INCLUDED TEXT--------------------

Document ID:  HPSBUX9907-100
Date Loaded:  19990707
      Title:  CDE Leaves Current Directory in root PATH

- -------------------------------------------------------------------------
    HEWLETT-PACKARD COMPANY SECURITY BULLETIN: #00100, 07 July 1999
- -------------------------------------------------------------------------

The information in the following Security Bulletin should be acted upon
as soon as possible.  Hewlett-Packard Company will not be liable for any
consequences to any customer resulting from customer's failure to fully
implement instructions in this Security Bulletin as soon as possible.

- -------------------------------------------------------------------------
PROBLEM:  The current directory is in the root user's PATH
          after logging in using CDE.

PLATFORM: HP 9000 series 700/800 at hp-ux revision 10.X

DAMAGE:  Increase in privledges.

SOLUTION: Modify /usr/dt/bin/Xsession until a patch is available.

AVAILABILITY:  This advisory will be updated when patches are available.

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

I.
   A. Background - The PATH environemnt variable is constructed from
      several sources including dtsearchpath and scripts in
      /etc/dt/config/Xsession.d/ and /usr/dt/config/Xsession.d/.
      The resulting PATH contains the string "::" which will be
      interpreted as the current directory.  The root user should
      not have the current directory in the PATH.

   B. Fixing the problem - Since the PATH environment variable can be
      affected by dtsearchpath and several scripts, the recommended
      solution is to clean up the root user's PATH after is has been
      created.

In /usr/dt/bin/Xsession just before this:

# ###########################################################################
#
#   Startup section.


Add this:

###################### Clean up $PATH for root ##########################
if [ "$USER" = "root" ]
then
  Log "Clean up PATH for root user"
  Log "Old PATH = $PATH"
  PATH=`echo $PATH | awk '
{
 # Remove elements from PATH that are
 #  (a)  "."
 #  (b)  ""
 #  (c)  blank
 #
   gsub (" ",":", $0) # Substitite ":" for each blank
   n = split ($0, path, ":")  # Split into elements with ":" as delimiter
   first = 1  # To suppress leading ":" in new PATH
   for (i=1; i<=n; i++) {
     len = length(path[i])
     dot = index(path[i], ".")
     dot_only = 0
     if ((len == 1) && (dot==1)) {
       dot_only = 1
     }
     # print element if it is not "" and not "."
     if (!(len==0) && !(dot_only==1)) {
       if(first != 1) {
         printf (":") # if not first element, print ":" in front
       }
       printf ("%s",path[i])
       first = 0
     }
  }
}
END { printf ("
") }'`
Log "New PATH = $PATH"
fi
###################### End - Clean up $PATH for root ####################

   C. To subscribe to automatically receive future NEW HP Security
      Bulletins from the HP Electronic Support Center via electronic
      mail, do the following:

      Use your browser to get to the HP Electronic Support Center page
      at:

        http://us-support.external.hp.com
               (for US, Canada, Asia-Pacific, & Latin-America)
        http://europe-support.external.hp.com     (for Europe)

      Login with your user ID and password (or register for one).
      Remember to save the User ID assigned to you, and your password.
      Once you are in the Main Menu:
      To -subscribe- to future HP Security Bulletins,
        click on "Support Information Digests".
      To -review- bulletins already released from the main Menu,
        click on the "Search Technical Knowledge Database."

      Near the bottom of the next page, click on "Browse the HP
      Security Bulletin Archive".
      Once in the archive there is another link to our current Security
      Patch Matrix.  Updated daily, this matrix categorizes security
      patches by platform/OS release, and by bulletin topic.

      The security patch matrix is also available via anonymous ftp:

      us-ffs.external.hp.com
      ~ftp/export/patches/hp-ux_patch_matrix

   D. To report new security vulnerabilities, send email to

       security-alert@hp.com

      Please encrypt any exploit information using the security-alert
      PGP key, available from your local key server, or by sending a
      message with a -subject- (not body) of 'get key' (no quotes) to
      security-alert@hp.com.

     Permission is granted for copying and circulating this Bulletin to
     Hewlett-Packard (HP) customers (or the Internet community) for the
     purpose of alerting them to problems, if and only if, the Bulletin
     is not edited or changed in any way, is attributed to HP, and
     provided such reproduction and/or distribution is performed for
     non-commercial purposes.

     Any other use of this information is prohibited. HP is not liable
     for any misuse of this information by any third party.
________________________________________________________________________
- -----End of Document ID:  HPSBUX9907-100--------------------------------------

- --------------------------END INCLUDED TEXT--------------------

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It will
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

	http://www.auscert.org.au/Information/advisories.html

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

Internet Email: auscert@auscert.org.au
Facsimile:	(07) 3365 7031
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.


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

iQCVAwUBN8QtdCh9+71yA2DNAQHYZwP6AierJwaPvlx+upwtkcVEai1r6CajnwQQ
EtLOGoq8JVKuS3bqzZ7pk6IPYG/yYONs2dYqA/Tix7BlN0zPEZk2DeBnygYtqkE/
zCoruoh6b5xelYqsBNCGziHZa4SVbaH97RiBcWJXcyHlxR4n15uDE/mKldCTl0qw
kkRCuxmHcO8=
=WANw
-----END PGP SIGNATURE-----