Original issue date: June 12, 1997<BR>
Last revised: January 5, 1998<BR>
Updated vendor information for Silicon Graphics, Inc.

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

<HR>The CERT Coordination Center has received reports of a buffer overflow
condition in some versions of the <I>at(1)</I> program. By carefully specifying
the data that overflows this buffer, any user can execute arbitrary commands
as root.

<P>The CERT/CC team recommends installing a vendor patch if one is available
(see Section III.A). Until you can do so, we recommend disabling <I>at(1)</I>
(see Section III.B).

<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>
<H2>I. Description</H2>
The <I>at(1)</I> program can be used by local users to schedule commands
to be executed at a later time. When those commands are run, they are run
as the user who originally ran <I>at(1)</I>. That user will be referred
to as the scheduling user.

<P>As a precaution, the scheduling user's list of commands is stored in
a file in a directory that is not writable by other users. The file's ownership
is changed to that of the scheduling user, and that information is used
to define the identity of the process that runs the commands when the appointed
time arrives. These measures are intended to prevent other users from changing
the scheduling user's list of commands or creating new lists to be executed
as another user. To achieve this additional level of security, the <I>at(1)</I>
program runs as set-user-id root.

<P>Some versions of <I>at(1)</I> contain a programming defect that can
result in a buffer local to <I>at(1)</I> being overflowed. Through the
careful specification of the data that overflows this buffer, arbitrary
commands can be executed with the identity of <I>at(1)</I> process, root
in this case.
<H2>II. Impact</H2>
Any user with an account on a system that contains a defective version
of <I>at(1)</I> can execute programs as root.
<H2>III. Solution</H2>

<H3>A. Install a patch from your vendor</H3>
Below is a list of vendors who have provided information about at. Details
are in Appendix A of this advisory; we will update the appendix as we receive
more information. If your vendor's name is not on this list, the CERT/CC
did not hear from that vendor. Please contact your vendor directly.

<P>Berkeley Software Design, Inc. (BSDI)
<BR>Cray Research - A Silicon Graphics Company
<BR>Data General Corporation
<BR>Digital Equipment Corporation
<BR>Hewlett-Packard Company
<BR>IBM Corporation
<BR>NCR Corporation
<BR>Santa Cruz Operation, Inc. (SCO)
<BR>Silicon Graphics, Inc.
<BR>Sun Microsystems, Inc.
<BR>
<H3>B. Until you are able to install the appropriate patch, we recommend the following workaround:</H3>
Turn off <I>at(1)</I> by setting its mode to 0. Do the following as root:

<P># chmod 0 /usr/bin/at

<P>Note that the location of <I>at(1)</I> varies from system to system.
Consult your system's documentation for the correct location.

<P>After you turn off the <I>at(1)</I> command, users will not be able
to use it. As an alternative to <I>at(1)</I>, consider using the <I>crontab(1)</I>
command if your system provides it.
<BR>

<P><HR>
<H2>Appendix A - Vendor Information</H2>
Below is a list of the vendors who have provided information for this advisory.
We will update this appendix as we receive additional information. If you
do not see your vendor's name, the CERT/CC did not hear from that vendor.
Please contact the vendor directly.
<H3>Berkeley Software Design, Inc. (BSDI)</H3>
No versions of BSD/OS are susceptible to this problem.
<H3>Cray Research - A Silicon Graphics Company</H3>
Neither Unicos nor Unicos/mk is believed to be vulnerable.
<H3>Data General Corporation</H3>
No versions of DG/UX are vulnerable to this problem.
<H3>Digital Equipment Corporation</H3>
Copyright (c) Digital Equipment Corporation 1997. All rights reserved.

<P>Information about this reported problem, and subsequent attempts to
reproduce the problem have been unsuccessful for Digital's ULTRIX or Digital
UNIX Operating Systems Software. Should further information or testing
indicate this problem can be reproduced on Digital's products, a solution
will be provided accordingly. At that time Digital will provide notice
of the completion/availability of the patches through AES services (DIA,
DSNlink FLASH) and be available from your normal Digital Support channel.
<UL>
<UL>
<UL>
<UL>
<UL>
<UL>
<UL>DIGITAL EQUIPMENT CORPORATION 6 / 09 / 97</UL>
</UL>
</UL>
</UL>
</UL>
</UL>
</UL>

<H3>Hewlett-Packard Company</H3>
Hewlett Packard has published information relating to this problem in Security
Bulletin #00023. It is available from the HP Electronic Support Center.
The center's Web page is at

<P><A HREF="http://us-support.external.hp.com">http://us-support.external.hp.com</A>
<BR>(for US, Canada, Asia-Pacific, and Latin-America)

<P><A HREF="http://europe-support.external.hp.com">http://europe-support.external.hp.com</A>
<BR>(for Europe)
<BR>
<H3>IBM Corporation</H3>
See the appropriate release below to determine your action.
<BR>
<H4>AIX 3.2</H4>
Apply the following fixes to your system:

<P>PTF - U443452 U443486 U444191 U444206 U444213 U444243
<BR>APAR - IX60796

<P>To determine if you have these PTFs on your system, run the following
commands:

<P>lslpp -lB U443452 U443486 U444191 U444206 U444213 U444243
<H4>AIX 4.1</H4>
Apply the following fixes to your system:

<P>APAR - IX60894
<BR>APAR - IX60890

<P>To determine if you have this APAR on your system, run the following
commands:

<P>instfix -ik IX60894
<BR>instfix -ik IX60890

<P>Or run the following commands:

<P>lslpp -h bos.rte.cron
<BR>lslpp -h bos.rte.libc

<P>Your version of bos.rte.cron should be 4.1.4.8 or later.
<BR>Your version of bos.rte.libc should be 4.1.4.18 or later.
<BR>
<H4>AIX 4.2</H4>
Apply the following fixes to your system:

<P>APAR - IX60892
<BR>APAR - IX61125

<P>To determine if you have this APAR on your system, run the following
commands:

<P>instfix -ik IX60892
<BR>instfix -ik IX61125

<P>Or run the following commands:

<P>lslpp -h bos.rte.cron
<BR>lslpp -h bos.rte.libc

<P>Your version of bos.rte.cron should be 4.2.0.1 or later.
<BR>Your version of bos.rte.libc should be 4.2.0.5 or later.
<H4>To Order</H4>
APARs may be ordered using Electronic Fix Distribution (via FixDist) or
from the IBM Support Center. For more information on FixDist, reference
URL:

<P><A HREF="http://service.software.ibm.com/aixsupport/">http://service.software.ibm.com/aixsupport/</A>

<P>or send e-mail to <A HREF="mailto:aixserv@austin.ibm.com">aixserv@austin.ibm.com</A>
with a subject of "FixDist".
<BR>
<BR>IBM and AIX are registered trademarks of International Business Machines
Corporation.
<H3>NCR Corporation</H3>

<P>The at binary that ships with some NCR MP-RAS SVR4 releases contains
a vulnerability that could allow a user to execute random commands as
root.

<P>NCR is delivering a set of operating system dependent patches which
contain a new version of the at command.  Accompanying each patch is
a README file which discusses the general purpose of the patch and
describes how to apply it to your system.

<P>Recommended solution:

<P>Apply one of the following patches based on your operating system
revision:
<BR>
<PRE>

<P>
<BR>MP-RAS 3.00.x                  - PBASEI300 (Version after 8/18-97)
<BR>MP-RAS 3.01.x                  - PBASEE300 (Version after 8/26-97)
<BR>MP-RAS 3.02.x and later        - Not vulnerable
</PRE>


<P>The patches described above provide a new version of the at
executable, which fixes the vulnerability.

<H3>Santa Cruz Operation, Inc. (SCO)</H3>
All SCO operating systems are vulnerable. SCO has made an interim fix available
for anonymous ftp:

<P><A HREF="ftp://ftp.sco.com/SSE/sse007.ltr.Z - cover letter">ftp://ftp.sco.com/SSE/sse007.ltr.Z
- cover letter</A>
<BR><A HREF="ftp://ftp.sco.com/SSE/sse007.tar.Z - replacement binaries">ftp://ftp.sco.com/SSE/sse007.tar.Z
- replacement binaries</A>

<P>The fix includes binaries for the following SCO operating systems:

<P>- SCO CMW+ 3.0
<BR>- SCO Open Desktop/Open Server 3.0, SCO UNIX 3.2v4
<BR>- SCO OpenServer 5.0
<BR>- SCO UnixWare 2.1
<H3>Silicon Graphics, Inc.</H3>

<P>Silicon Graphics Inc. has investigated the issue and recommends the
following steps for neutralizing the exposure.  It is HIGHLY RECOMMENDED
that these measures be implemented on ALL SGI systems.  This issue will
be corrected in future releases of IRIX.

<P>For further information, please refer to Silicon Graphics
Inc. Security Advisory Number: 19971102-01-PX, "Vulnerability in at(1)
program."

<P>The SGI anonymous FTP site is sgigate.sgi.com (204.94.209.1) or its
mirror, ftp.sgi.com.   Security information and patches can be found
in the ~ftp/security and ~ftp/patches directories, respectfully.

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

<PRE>  
Bulletin Number:        #00160
Date:                   December 3, 1997
</PRE>  

<P>Sun security bulletins are available via World Wide Web at:

<BR>  <A HREF="http://sunsolve.sun.com/sunsolve/secbulletins">http://sunsolve.sun.com/sunsolve/secbulletins </A>

<P>The following patches are available in relation to the at problem.
<BR>
<PRE>
    OS version          Patch ID
    ---------------     ---------
    SunOS 5.5.1         103690-05
    SunOS 5.5.1_x86     103691-05
    SunOS 5.5           103723-05
    SunOS 5.5_x86       103724-05
    SunOS 5.4           102693-05       
    SunOS 5.4_x86       102694-05       
    SunOS 5.3           101572-08
</PRE>

<P><HR>

<P>Technical information for this advisory was drawn in part from a posting
by Don Farmer to the bugtraq mailing list.
<BR>Thanks to Wolfgang Ley of DFN-CERT for his help in developing this
advisory.

<P><HR>

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

<HR>

Revision History
<PRE>
Jan. 5, 1998  Updated vendor information for Silicon Graphics, Inc.
Dec. 5, 1997  Updated vendor information for NCR Corporation and Sun
 Microsystems, Inc.
Sep. 30, 1997 Updated copyright statement
Aug. 28, 1997 Section III and Appendix A - added vendor information
 for NCR Corporation.
Aug. 16, 1997 Appendix A - added Data General information.
July 14, 1997 Appendix A - updated Hewlett-Packard information.
June 25, 1997 Section IIIA and Appendix A - Added vendor information
 for Berkeley Software Design, Inc. (BSDI).
June 12, 1997 Section IIIA and Appendix A - Added vendor information
 for Digital Equipment Corporation.
</PRE>