-----BEGIN PGP SIGNED MESSAGE-----
===============================================================================
Security Advisory CERT-NL
===============================================================================
Author/Source : Don Stikvoort Index : S-97-21
Distribution : World Page : 1
Classification: External Version: 1
Subject : Solaris 2.x fdformat Buffer Overflow Date : 24-Mar-97
Vulnerability
===============================================================================
By courtesy of AUSCERT and Christian Schipor (via BUGTRAQ) we received
information on a vulnerability in Solaris 2.x fdformat, allowing for root
access.
CERT-NL recommends to apply the workaround suggested in AUSCERT's text below.
==============================================================================
AA-97.11 AUSCERT Advisory
Solaris 2.x fdformat Buffer Overflow Vulnerability
24 March 1997
Last Revised: --
- ----------------------------------------------------------------------------
AUSCERT has received information that a vulnerability exists in
fdformat(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
fdformat(1) is a utility for formatting both diskettes and PCMCIA
memory cards.
Due to insufficient bounds checking on arguments which are supplied
by users, it is possible to overwrite the internal stack space of the
fdformat program while it is executing. By supplying a carefully
designed argument to the fdformat program, intruders may be able to
force fdformat to execute arbitrary commands. As fdformat 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/fdformat
fdformat 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 fdformat 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 Remove setuid execute permissions
To prevent the exploitation of the vulnerability described in this
advisory, AUSCERT recommends that the setuid permissions be removed
from the fdformat program immediately.
# ls -l /usr/bin/fdformat
-r-sr-xr-x 1 root bin 26284 Oct 25 1995 /usr/bin/fdformat
# chmod 555 /usr/bin/fdformat
# ls -l /usr/bin/fdformat
-r-xr-xr-x 1 root bin 26284 Oct 25 1995 /usr/bin/fdformat
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 fdformat 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 to 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:
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
Phone: +31 302 305 305
Fax: +31 302 305 329
Snailmail: SURFnet bv
Attn. CERT-NL
P.O. Box 19035
NL - 3501 DA UTRECHT
The Netherlands
A 7 * 24 hours phone number is available to SURFnet SSC's and FIRST
members on request.
==============================================================================
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
iQCVAwUBMzZys0U5nQkWIq1FAQH79AQAulzP+dQ01zg0WC9uH7wHOv8iMYgAZXtG
TF7OCW1kRxxuRLbbsjCV1K3UXqCUFaS2L7s7T+FLI/tdNCaaJG6HzGHcjjp3ygl0
+/8D93HqYI4dfOGLp/EiBVbRPIhufpJJB03KbkrmIBQh16vcneyV1CGDcqP+aPyf
5gNDvXkw5yE=
=bSiU
-----END PGP SIGNATURE-----