Original issue date: January 26, 1995<BR>
Last revised: September 23, 1997<BR>
Updated Copyright statement

<P>A complete revision history is at the end of this file.

<B>This advisory supersedes CA-91.01a and CA-91.13.</B>

<P>There are vulnerabilities in some versions of /bin/mail. Section III below
provides vendor-specific information and an alternative to /bin/mail.

<P>We will update this advisory as we receive additional information.
Please check advisory files regularly for updates that relate to your site.

<P><HR>

<P>
<H2>I. Description</H2>

Some versions of /bin/mail based on BSD 4.3 UNIX are vulnerable
because of timing windows in the way /bin/mail uses publicly writable
directories.

<P>
<H2>II. Impact</H2>

Local users (users that have an account on the system) can create
or modify root-owned files on the system and can thereby gain
unauthorized root access.
<BR>
<H2>III. Solutions</H2>

Either install a patch from your vendor or replace /bin/mail with
mail.local.

<P>
<H3>A.  Obtain the appropriate patch from your vendor and install it according to the instructions included with the patch.</H3>

<P>Below is a summary of the vendors listed in Appendix A of this
advisory and the information they have provided. If your vendor's
name is not on this list, please contact the vendor directly.

<P>
<CENTER>
<TABLE WIDTH="80%">
<TR><TH WIDTH="50%" ALIGN=LEFT>Vendor or Source</TH><TH WIDTH="50%">Status</TH></TR>
<TR><TD><HR></TD><TD><HR></TD></TR>
<TR><TD>Apple Computer, Inc.</TD><TD>not vulnerable</TD></TR>
<TR><TD>Berkeley SW Design, Inc. (BSDI)</TD><TD>not vulnerable</TD></TR>
<TR><TD>Data General Corp.</TD><TD>not vulnerable</TD></TR>
<TR><TD>Digital Equipment Corp.</TD><TD>vulnerable, patches available</TD></TR>
<TR><TD>Free BSD</TD><TD>not vulnerable</TD></TR>
<TR><TD>Harris</TD><TD>not vulnerable</TD></TR>
<TR><TD>IBM</TD><TD>not vulnerable</TD></TR>
<TR><TD>NetBSD</TD><TD>not vulnerable</TD></TR>
<TR><TD>NeXT, Inc.</TD><TD>not vulnerable</TD></TR>
<TR><TD>Pyramid</TD><TD>not vulnerable</TD></TR>
<TR><TD>The Santa Cruz Operation (SCO)</TD><TD>see note in Appendix A</TD></TR>
<TR><TD>Solbourne (Grumman)</TD><TD>vulnerable - contact vendor</TD></TR>
<TR><TD ROWSPAN=2 VALIGN=TOP>Sun Microsystems, Inc.</TD><TD>SunOS 4.x vulnerable, patches available,<BR> patch revisions coming soon</TD></TR>
<TR><TD>Solaris 2.x not vulnerable</TD></TR>
</TABLE></CENTER>

<P>
<H3>B. Replace /bin/mail with mail.local.</H3>

If you cannot obtain a vendor-supplied replacement for /bin/mail, the
CERT Coordination Center recommends using mail.local as a replacement
for /bin/mail.

<P>Although the current version of mail.local is not a perfect solution,
it addresses the vulnerabilities currently being exploited in
/bin/mail.

<P>mail.local is now provided with the lastest version of sendmail.
That version can be found at

<P>
<A HREF=ftp://ftp.cert.org/pub/tools/sendmail/sendmail-latest*>ftp://ftp.cert.org/pub/tools/sendmail/sendmail-latest*</A>

<P>The original version of mail.local has been tested on SunOS 4.1
and Ultrix 4.X systems.

<P>Mail.local.c for BSD 4.3 systems, along with a README file containing
installation instructions, can be found on the anonymous FTP servers
listed below.

<H4>Location</H4>
<A HREF=ftp://ftp.cert.org/pub/tools/mail.local/mail.local.c>ftp://ftp.cert.org/pub/tools/mail.local/mail.local.c</A>
<BR>
MD5  c0d64e740b42f6dc5cc54a2bc37c31b0

<P>
<A HREF=ftp://coast.cs.purdue.edu/pub/tools/unix/mail.local/mail.local.c>ftp://coast.cs.purdue.edu/pub/tools/unix/mail.local/mail.local.c</A>
<BR>
MD5  c0d64e740b42f6dc5cc54a2bc37c31b0
<BR>

<P><HR>

<P>
<H2>Appendix A: Vendor Information</H2>

Below is information we have received from vendors who have patches available
or upcoming for the vulnerabilities described in this advisory, as well as
vendors who have confirmed that their products are not vulnerable. If your
vendor's name is not in one of these lists, contact the vendor directly for
information on whether their version of sendmail is vulnerable and, if so, the
status of patches to address the vulnerabilities.

<P>
<H3>NOT VULNERABLE</H3>

The following vendors have reported that their products are NOT vulnerable.
<UL>
Apple Computer, Inc.<BR>
Berkeley SW Design, Inc. (BSDI)<BR>
Data General Corp.<BR>
Harris<BR>
IBM<BR>
NeXT, Inc.<BR>
Pyramid<BR>
The Santa Cruz Operation (SCO) - not vulnerable, but see note below<BR>
Sun Microsystems, Inc. - Solaris 2.x (SunOS 4.x is vulnerable; see
below)
</UL>

In addition, we have reports that the following <I>products</I> are NOT vulnerable.
<UL>
FreeBSD<BR>
NetBSD<BR>
</UL>

<H3>VULNERABLE</H3>

We have reports that the following vendors' products ARE vulnerable.
Patch information is provided below.

<P>
<H4>Digital Equipment Corporation</H4>

<TABLE>
<TR><TD VALIGN=TOP>Vulnerable:</TD><TD>DEC OSF/1 versions 1.2, 1.3, and 2.0<BR>DEC ULTRIX versions 4.3, 4.3A, and 4.4</TD></TR>
</TABLE>

<P>Obtain and install the appropriate patch according to the instructions
included with the patch. The patch that corrects the /bin/mail problem in each
case is part of a comprehensive Security Enhanced Kit that addresses other
problems as well. This kit has been available since May 17, 1994. It is
described in DEC security advisory #0505 and in CERT bulletin VB-94:02.

<P>
<OL>
<LI>DEC OSF/1<BR>
Upgrade/install OSF/1 to a minimum of V2.0 and
install Security Enhanced Kit CSCPAT_4061 v1.0.

<LI><P>DEC ULTRIX<BR>
Upgrade/install ULTRIX to a minimum of V4.4 and
install Security Enhanced Kit CSCPAT_4060 v1.0.
</OL>
Both kits listed above are available from Digital Equipment Corporation by
contacting your normal Digital support channel or by request via DSNlink for
electronic transfer.

<P>
<H4>The Santa Cruz Operation (SCO)</H4>

SCO's version of /bin/mail is not vulnerable to the problems mentioned
in this advisory. SCO's /bin/mail is not setuid-root. However, SCO's
/bin/mail has other security-related issues that are fixed by SCO's
Support Level Supplement (SLS) uod392a. To get this:

<P>
<TABLE>
<TR><TD ROWSPAN=3 VALIGN=TOP WIDTH="10%">ftp:</TD><TD WIDTH="45%">
<A HREF="ftp://ftp.sco.com/SLS/uod392a.Z">ftp.sco.COM:/SLS/uod392a.Z</A></TD>
<TD WIDTH="45%">(compressed disk image)</TD></TR>
<TR><TD><A HREF="ftp://ftp.sco.com/SLS/uod392a.ltr.Z">ftp.sco.COM:/SLS/uod392a.ltr.Z</A></TD><TD>(cover letter)</TD></TR>
<TR><TD><A HREF="ftp://ftp.sco.com/SLS/README">ftp.sco.COM:/SLS/README</A></TD><TD></TD></TR>
</TABLE>

<P>
<H4>Solbourne</H4>

Grumman System Support Corporation now performs all Solbourne
software and hardware support. Please contact them for further
information.

<P>ftp: <A HREF="ftp://ftp.nts.gssc.com">ftp.nts.gssc.com</A><BR>
phone: 1-800-447-2861<BR>
e-mail: <A HREF=mailto:support@nts.gssc.com>support@nts.gssc.com</A> 

<P>
<H4>Sun Microsystems, Inc.</H4>

Current patches are listed below:

<P><CENTER>
<TABLE WIDTH="80%">
<TR><TH WIDTH="15%">SunOS</TH><TH WIDTH="30%">Patch</TH><TH WIDTH="55%">MD5 Checksum</TH></TR>
<TR><TD COLSPAN=3><HR></TD></TR>
<TR><TD>4.1.3</TD><TD>100224-13.tar.Z</TD><TD>90a507017a1a40c4622b3f1f00ce5d2d</TD></TR>
<TR><TD>4.1.3U1</TD><TD>101436-08.tar.Z</TD><TD>0e64560edc61eb4b3da81a932e8b11e1</TD></TR>
</TABLE></CENTER>

<P>The patches can be obtained from local Sun Answer Centers and
through anonymous FTP from ftp.uu.net in the /systems/sun/sun-dist
directory. In Europe, the patches are available from mcsun.eu.net
in the /sun/fixes directory.

<P><HR>
The CERT Coordination Center thanks Eric Allman, Wolfgang Ley, Karl
Strickland, Wietse Venema, and Neil Woods for their contributions to
mail.local.
<HR>

<P>
<!--here is the beginning of the end stuff-->

<!--#include virtual="/include/footer_nocopyright.html" -->
<P>Copyright 1995, 1996 Carnegie Mellon University.</P>

<HR>

Revision History
<PRE>
Sep. 23 1997   Updated Copyright statement
Nov. 21, 1996  Removed Appendices B &amp; C.
               Sec. B, paragraph 3 - updated information about the location
               of mail.local.
Aug. 30, 1996  Information previously in the README was inserted
               into the advisory, and URL formats were updated.
June 09, 1995  Appendix A - corrected patch information from Sun.
</PRE>