exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

S-97-19.asc

S-97-19.asc
Posted Jan 10, 2000

Subject Solaris 2.x eject Buffer Overrun

tags | overflow
systems | solaris
SHA-256 | 49ce491205e22f80ef3d40112109757b2507d7ffa57fc11fa3ead39b82a902ef

S-97-19.asc

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===============================================================================
>> CERT-NL, 01-Mar-2000 <<
>> All CERT-NL information has been moved to http://cert.surfnet.nl. Links <<
>> to CERT-NL information contained in this advisory are therefore outdated. <<
>> <<
>> CERT-NL also has stopped the CERT-CC-Mirror service. Due to this the <<
>> links to the CERT-CC mirror are obsolete. Visit the CERT-CC site for the <<
>> complete CERT-CC advisory texts: http://www.cert.org <<
===============================================================================

===============================================================================
Security Advisory CERT-NL
===============================================================================
Author/Source : Gert Meijerink Index : S-97-19
Distribution : World Page : 1
Classification: External Version: 1
Subject : Solaris 2.x eject Buffer Overrun
Vulnerability Date : 17-mar-97
===============================================================================

By courtesy of AUSCERT we received information on a vulnerability in
Solaris 2.x eject Buffer Overrun Vulnerability

CERT-NL recommends that sites apply the workaround given in Section 3 until
vendor patches are made available.

===========================================================================
AA-97.10 AUSCERT Advisory
Solaris 2.x eject Buffer Overrun Vulnerability
14 March 1997

Last Revised: --

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

AUSCERT has received information that a vulnerability exists in eject(1),
distributed under Solaris 2.4, 2.5 and 2.5.1. Earlier versions may be
vulnerable.

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

eject(1) is a program used for those removable media devices that do
not have a manual eject button, or for those that do, but are managed
by Volume Management

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

Sites can determine if this program is installed by using:

% ls -l /usr/bin/eject

eject is installed by default in /usr/bin. Sites are encouraged to
check for the presence of this program regardless of the version of
Solaris installed.

Exploit information involving this vulnerability has been made publicly
available.

Sun Microsystems has informed AUSCERT that they are currently working
on this vulnerability.

2. Impact

Local users may gain root privileges.

3. Workarounds/Solution

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

If the eject functionality is required AUSCERT recommends applying
the workaround given in Section 3.2.

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 Remove setuid and non-root execute permissions

To prevent the exploitation of the vulnerability described in this
advisory, AUSCERT recommends that the setuid permissions be removed
from the eject program immediately. As eject will no longer work for
non-root users, it is recommended that the execute permissions also
be removed.

# ls -l /usr/bin/eject
-r-sr-xr-x 1 root other 5804 Mar 14 09:47 /usr/bin/eject

# chmod 500 /usr/bin/eject
# ls -l /usr/bin/eject
-r-x------ 1 root other 5804 Mar 14 09:47 /usr/bin/eject

3.2 Install eject 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.2.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.2.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 eject 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 eject command. The wrapper program can also be
configured to syslog any failed attempts to execute eject with
arguments exceeding MAXARGLEN. For further instructions on using this
wrapper, please read the comments at the top of overflow_wrapper.c.

When compiling overflow_wrapper.c for use with eject, 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.2.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/eject.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/eject_wrapper.tar.Z

The MD5 checksum for eject_wrapper.tar.Z is:

MD5 (eject_wrapper.tar.Z) = 1ae34aea7a637d6464105cbec7ff4443

eject_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. The binaries have been linked statically so they are larger
than the default eject binary.

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

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

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 eject program is not
needed by many sites. If sites had previously disabled this program,
they would not have been susceptible to this latest vulnerability.


- - ---------------------------------------------------------------------------
AUSCERT thanks Brian Meilak (Queensland University of Technology) and Sun
Microsystems for their assistance in this matter.
- - ---------------------------------------------------------------------------

==============================================================================
CERT-NL is the Computer Emergency Response Team for SURFnet customers. SURFnet
is the Dutch network for educational, research and related institutes. CERT-NL
is a member of the Forum of Incident Response and Security Teams (FIRST).

All CERT-NL material is available under:
http://cert.surfnet.nl/

In case of computer or network security problems please contact your local
CERT/security-team or CERT-NL (if your institute is NOT a SURFnet customer
please address the appropriate (local) CERT/security-team).

CERT-NL is one/two hour(s) ahead of UTC (GMT) in winter/summer,
i.e. UTC+0100 in winter and UTC+0200 in summer (DST).

Email: cert-nl@surfnet.nl ATTENDED REGULARLY ALL DAYS
Phone: +31 302 305 305 BUSINESS HOURS ONLY
Fax: +31 302 305 329 BUSINESS HOURS ONLY
Snailmail: SURFnet bv
Attn. CERT-NL
P.O. Box 19035
NL - 3501 DA UTRECHT
The Netherlands

NOODGEVALLEN: 06 22 92 35 64 ALTIJD BEREIKBAAR
EMERGENCIES : +31 6 22 92 35 64 ATTENDED AT ALL TIMES
CERT-NL'S EMERGENCY PHONENUMBER IS ONLY TO BE USED IN CASE OF EMERGENCIES:
THE SURFNET HELPDESK OPERATING THE EMERGENCY NUMBER HAS A *FIXED*
PROCEDURE FOR DEALING WITH YOUR ALERT AND WILL IN REGULAR CASES RELAY IT
TO CERT-NL IN AN APPROPRIATE MANNER. CERT-NL WILL THEN CONTACT YOU.
===============================================================================

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.1i

iQA/AwUBOL6IUTSYjBqwfc9jEQK7EgCfQxLbf5OkqhcOWdEQLLXUWlKwRdMAoNTf
0KsJ3ajI9C28kDAcyOH97AHa
=skd7
-----END PGP SIGNATURE-----
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close