TUCoPS :: SunOS/Solaris :: ciach037.txt

Solaris 2x Passwd Buffer Overrun

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





             __________________________________________________________

                       The U.S. Department of Energy
                    Computer Incident Advisory Capability
                           ___  __ __    _     ___
                          /       |     /_\   /
                          \___  __|__  /   \  \___
             __________________________________________________________

                             INFORMATION BULLETIN

                Solaris 2.x passwd buffer Overrun Vulnerability

March 3, 1997 21:00 GMT                                            Number H-37
______________________________________________________________________________
PROBLEM:       A vulnerability exists in the passwd(1) program.
PLATFORM:      All platforms with Solaris 2.x.
DAMAGE:        This vulnerability may allow local users to gain root
               privileges.
SOLUTION:      Until patches are available, take the steps outlined in Section
               3 as soon as possible.
______________________________________________________________________________
VULNERABILITY  Exploit details involving this vulnerability have been made
ASSESSMENT:    publicly available.
______________________________________________________________________________

[ Start AUSCERT Advisory ]

===========================================================================
AA-97.09                        AUSCERT Advisory
                 Solaris 2.x passwd buffer Overrun Vulnerability
                                26 February 1997

Last Revised:   3 March 1997
                Fixed information regarding versions prior to Solaris 2.5.     
                Added information on getting binary versions of the wrapper.

- ----------------------------------------------------------------------------
AUSCERT has received information that a vulnerability exists in the
passwd(1) program under Solaris 2.x. 

This vulnerability may allow local users to gain root privileges.

Exploit information involving this vulnerability has been made
publicly available.

Currently there are no vendor patches available that address 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

    AUSCERT has received information that a vulnerability exists in the
    Solaris 2.x passwd(1) program.  Under Solaris 2.5, yppasswd(1) and
    nispasswd(1) are hard links to the passwd program, and as such are
    also vulnerable.  Under Solaris 2.3 and 2.4, passwd, yppasswd and
    nispasswd are separate programs.  Of these, only passwd is known to
    be exploitable.

    Due to insufficient bounds checking on arguments which are supplied
    by users, it is possible to overwrite the internal stack space of the
    passwd program while it is executing.  By supplying a carefully
    designed argument to the passwd program, intruders may be able to
    force passwd to execute arbitrary commands.  As passwd is setuid
    root, it may allow intruders to run arbitrary commands with root
    privileges.

    Exploit information involving this vulnerability has been made
    publicly available.

    passwd, yppasswd and nispasswd under Solaris 2.x are located by
    default in /usr/bin/.

2.  Impact

    Local users may gain root privileges.

3.  Workarounds/Solution

    AUSCERT recommends that sites limit the possible exploitation of
    this vulnerability by immediately applying the workaround given in
    Section 3.1.

    Currently there are no vendor patches available that address this
    vulnerability.  AUSCERT recommends that official vendor patches be
    installed when they are made available.

3.1 Install passwd wrapper

    AUSCERT has developed a wrapper to help prevent programs from being
    exploited using the vulnerability described in this advisory.  Sites
    which have a C compiler can obtain the source, compile and install
    the wrapper as described in Section 3.1.1.  For sites without a C
    compiler, AUSCERT has made pre-compiled binaries available for Solaris
    2.4, 2.5 and 2.5.1 (Section 3.1.2).

3.1.1 Installing the wrapper from source

    The source for the wrapper, including installation instructions, can
    be found at:

        ftp://ftp.auscert.org.au/pub/auscert/tools/overflow_wrapper.c

    This wrapper replaces the passwd program and checks the length of the
    command line arguments which are passed to it.  If an argument exceeds
    a certain predefined value (MAXARGLEN), the wrapper exits without
    executing the passwd command.  The wrapper program can also be
    configured to syslog any failed attempts to execute passwd with
    arguments exceeding MAXARGLEN.  For further instructions on using this
    wrapper, please read the comments at the top of overflow_wrapper.c.

    Applying this wrapper program to passwd, following the instructions
    given in the comments at the start of the wrapper program, will also
    fix the overflow problems with yppasswd and nispasswd under Solaris
    2.5, since these programs are merely hard links to passwd.

    When compiling overflow_wrapper.c for use with passwd, AUSCERT
    recommends defining MAXARGLEN to be 32.

    The MD5 checksum for Version 1.0 of overflow_wrapper.c is:

        MD5 (overflow_wrapper.c) = f7f83af7f3f0ec1188ed26cf9280f6db

3.1.2 Installing the wrapper binaries

    Pre-compiled wrapper binaries are provided for sites that wish to
    install the wrapper but do not have a C compiler available.  AUSCERT
    has compiled the wrapper on Solaris 2.4, 2.5 and 2.5.1.  The following
    compile time options have been used to the create the binaries:

        REAL_PROG='"/usr/bin/passwd.real"'
        MAXARGLEN=32
        SYSLOG

    More information on these options can be found in Section 3.1.1 and
    in the overflow_wrapper.c source code.

    The pre-compiled binaries for the wrapper program can be retrieved from:

        ftp://ftp.auscert.org.au/pub/auscert/tools/passwd_wrapper.tar.Z

    The MD5 checksum for passwd_wrapper.tar.Z is:

        MD5 (passwd_wrapper.tar.Z) = 9b49f5522ef4a481c7e4b4c1fb4f816f

    passwd_wrapper.tar.Z contains a README file with installation
    instructions, as well as pre-compiled binaries for Solaris 2.4, 2.5
    and 2.5.1.

    Sites are encouraged to carefully read the installation notes in
    the README file before installation.

[ End AUSCERT Advisory ]

______________________________________________________________________________

CIAC wishes to acknowledge the contributions of AUSCERT, Jim Gifford (Board of
Regents of the University System of Georgia) and Sun Microsystems 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 510-422-8193
    FAX:      +1 510-423-8002
    STU-III:  +1 510-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 510-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://ciac.llnl.gov/
   Anonymous FTP:       ciac.llnl.gov (128.115.19.53)
   Modem access:        +1 (510) 423-4753 (28.8K baud)
                        +1 (510) 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. CIAC-NOTES for Notes, a collection of computer security articles;
3. SPI-ANNOUNCE for official news about Security Profile Inspector
   (SPI) software updates, new features, distribution and
   availability;
4. 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 ListProcessor, 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, CIAC-NOTES, SPI-ANNOUNCE or SPI-NOTES for list-name and
valid information for LastName FirstName and PhoneNumber when sending

E-mail to       ciac-listproc@llnl.gov:
        subscribe list-name LastName, FirstName PhoneNumber
  e.g., subscribe ciac-notes OHara, Scarlett W. 404-555-1212 x36

You will receive an acknowledgment containing address, initial PIN,
and information on how to change either of them, cancel your
subscription, or get help.

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)

H-27: HP-UX vgdisplay Buffer Overrun Vulnerability
H-28: SGI IRIX startmidi/stopmidi Vulnerability
H-29: HP-UX sendmail Patches Vulnerability
H-30: Solaris ffbconfig Buffer Overrun Vulnerability
H-31: HP-UX ppl executable Vulnerability
H-32: HP-UX ppl Core Dump Vulnerability
H-33: HP-UX ftpd/kftpd Vulnerability
H-34: Vulnerability in innd
H-35: HP-UX vgdisplay command Vulnerability
H-36: Solaris 2.x CDE sdtcm_convert Vulnerability

RECENT CIAC NOTES ISSUED (Previous Notes available from CIAC)

Notes 07 - 3/29/95     A comprehensive review of SATAN

Notes 08 - 4/4/95      A Courtney update

Notes 09 - 4/24/95     More on the "Good Times" virus urban legend

Notes 10 - 6/16/95     PKZ300B Trojan, Logdaemon/FreeBSD, vulnerability
                       in S/Key, EBOLA Virus Hoax, and Caibua Virus

Notes 11 - 7/31/95     Virus Update, Hats Off to Administrators,
                       America On-Line Virus Scare, SPI 3.2.2 Released,
                       The Die_Hard Virus

Notes 12 - 9/12/95     Securely configuring Public Telnet Services, X
                       Windows, beta release of Merlin, Microsoft Word
                       Macro Viruses, Allegations of Inappropriate Data
                       Collection in Win95

Notes 96-01 - 3/18/96  Java and JavaScript Vulnerabilities, FIRST
                       Conference Announcement, Security and Web Search
                       Engines, Microsoft Word Macro Virus Update


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMxtVbLnzJzdsy3QZAQEjXQP/V7EehrgHUhWjZz8Hk+ovb4B4Vz+I3adM
pUqRY0/ynsoU4iVkaxyzWsihE94DSf69MDOQ4bZmTk2XdVuF2sSL+C3CQD5h/wTC
9uPEAdBIA8pB6/0FyPzFRPD921b7UkOETeBA3HiV+VkmYdNNTA6WkD81iPBdSp6O
x6wzn6bXL54=
=MCBz
-----END PGP SIGNATURE-----

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH