Original issue date: December 12, 1995<BR>
Last revised: October 30, 1997<BR>
Updated vendor information for Sun.

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

<P>The CERT Coordination Center has received reports of a vulnerability in
the rpc.ypupdated program. An exploitation program has also been posted
to several newsgroups.

<P>This vulnerability allows remote users to execute arbitrary programs on
machines that provide Network Information Service (NIS) master and slave
services. Client machines of an NIS master or slave server are not affected.

<P>See Section III for a test to help you determine if you are vulnerable, along
with a workaround. In addition, Appendix A contains a list of vendors who have
reported their status regarding this vulnerability.

<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>

<P>The rpc.ypupdated program is a server used to change NIS information from
a network-based client using various methods of authentication.

<P>
<B>Note:</B><BR>
The Network Information Service (NIS) was formerly known as Sun
Yellow Pages (YP). The functionality of the two remains the same;
only the name has changed. The name Yellow Pages is a registered
trademark in the United Kingdom of British Telecommunications plc,
and may not be used without permission.

<P>Clients connect to rpc.ypupdated and provide authentication information
and proposed changes to an NIS database. If authenticated, the
information provided is used to update the selected NIS database.

<P>The protocol used when clients communicate with a server only checks
to see if the connection is authentic using secure RPC. The protocol
does not check to see if the client is authorized to modify the NIS
data or if the given NIS map exists. Even after an unsuccessful
attempt to update the NIS information, the rpc.ypupdated server invokes
the <I>make(1)</I> program to propagate possible changes. The invocation of
make is implemented in an insecure fashion which allows the requesting
client to pass malicious arguments to the call resulting in the execution
of arbitrary commands on NIS master and slave servers.

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

<P>Remote users can execute commands on vulnerable NIS master and slave
machines.

<P>
<H2>III. Solution</H2>

<P>First determine if you are vulnerable (see Sec. A below). If you are
vulnerable, either follow the instructions vendors have provided in
Appendix A or apply the workaround in Sec. B below.

<P>
<OL>
<H3><LI TYPE = "A">Consult the vendor information in Appendix A.</H3>

<P>If your vendor is not
listed, then check to see if your system has an rpc.ypupdated server.
To do this check, consult your system documentation or look in your
system initialization files (e.g., /etc/rc*, /etc/init.d/*, and
inetd.conf) for rpc.ypupdated or ypupdated. If you find a reference
to this program on your system, then it is likely that you are
vulnerable.

<P>
<H3><LI>Until patches are available for vulnerable systems, we recommend that you disable rpc.ypupdated as soon as possible.</H3>

<P>Below are some examples given for reference only. Consult your
system documentation for the exact details.

<P>In these examples, the rpc.ypupdated program is killed if it is
running, and the system is reconfigured so that the daemon does
not automatically start again when the system is rebooted.

<P>
<B>Example 1 - SunOS 4.1.X</B><BR>
For SunOS 4.1.X master and slave NIS servers, the
rpc.ypupdated program is started by the /etc/rc.local script.
First, determine if the server is running, and kill it if it
is. Then, rename rpc.ypupdated so that the /etc/rc.local
script will not find and therefore start it when the system
reboots.

<P>
<PRE>
# /bin/uname -a
SunOS test-sun 4.1.4 1 sun4m
# /bin/ps axc | /bin/grep rpc.ypupdated
  108 ?  IW    0:00 rpc.ypupdated
# /bin/kill 108
# /bin/ps axc | /bin/grep rpc.ypupdated
# /bin/grep ypupdated /etc/rc /etc/rc.local
/etc/rc.local:  if [ -f /usr/etc/rpc.ypupdated -a -d /var/yp/$dname ]; then
/etc/rc.local:          rpc.ypupdated;  echo -n ' ypupdated'
# /bin/mv /usr/etc/rpc.ypupdated /usr/etc/rpc.ypupdated.CA-95.17
# /bin/chmod 0 /usr/etc/rpc.ypupdated.CA-95.17
</PRE>

<P>
<B>Example 2 - IRIX</B><BR>
On IRIX systems, ypupdated is started by the inetd daemon. For
versions 3.X, 4.X, 5.0.X, 5.1.X, and 5.2, the ypupdated is
enabled; but for versions 5.3, 6.0.X, and 6.1, it is disabled.
Note that the byte counts given for /bin/ed may vary from system
to system. Note also that the inetd.conf file is found in
different locations for different releases of IRIX. For 3.X and
4.X, it is located in /usr/etc/inetd.conf. For all other releases
(5.0.X, 5.1.X, 5.2, 5.3, 6.0.X, and 6.1) it is in /etc/inetd.conf.

<P>
<PRE>
# /bin/uname -a
IRIX test-iris 5.2 02282015 IP20 mips
# /bin/grep ypupdated /etc/inetd.conf
ypupdated/1 stream rpc/tcp wait root /usr/etc/rpc.ypupdated ypupdated
# /bin/ps -eaf | /bin/grep rpc.ypupdated
    root   184     1  0   Nov 20 ?        0:00 /usr/etc/rpc.ypupdated
    root 14694 14610  2 11:30:07 pts/3    0:00 grep -i rpc.ypupdated
# /bin/kill 184
# /bin/ed /etc/inetd.conf
3344
/^ypupdated/s/^/#DISABLED# /p
#DISABLED# ypupdated/1 stream rpc/tcp wait root /usr/etc/rpc.ypupdated ypupdated
w
3355
q
# /bin/ps -eac | /bin/grep inetd
   193   TS  26 ?        0:04 inetd
# /bin/kill -HUP 193
</PRE>
</OL>

<P><HR>

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

<P>Below is information we have received from vendors. If you do not see your
vendor's name below, please contact the vendor directly for information.

<P>
<H4>Apple Computer, Inc.</H4>

<P>A/UX does not include this functionality and is therefore not vulnerable.

<P>
<H4>Berkeley Software Design, Inc. (BSDI)</H4>

<P>BSD/OS by Berkeley Software Design, Inc. (BSDI) is not vulnerable.

<P>
<H4>Data General Corporation</H4>

<P>Data General believes the DG/UX operating system to be NOT
vulnerable. This includes all supported release, DG/UX 5.4
Release 3.10, DG/UX Release 4.10 and all related Trusted DG/UX
releases.

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

<P>OSF/1 on all Digital platforms is not vulnerable.

<P>Digital ULTRIX platforms are not vulnerable to this problem.

<P>
<H4>Hewlett-Packard Company</H4>

<P>HP-UX versions 10.01, 10.10, and 10.20 are vulnerable (versions
prior to HP-UX 10.01 are not vulnerable).

<P>Solution: Do not run rpc.ypupdated. rpc.ypupdated is used
when adding or modifying the public:private key pair in the NIS
map public key.byname via the chkey command interface.
rpc.ypupdated should ONLY be run while changes are being made,
        then terminated when the changes are complete.<BR>
Make sure you re-kill rpc.ypupdated after each reboot.

<P>
<H4>IBM Corporation</H4>

<P>
<B>AIX 3.2</B>

<P>APAR - IX55360<BR>
PTF  - U440666

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

<P>
<PRE>
lslpp -lB U440666

</PRE>

<P>
<B>AIX 4.1</B>

<P>APAR - IX55363

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

<P>
<PRE>
lslpp -h | grep -p bos.net.nis.server
</PRE>

<P>Your version of bos.net.nis.server should be 4.1.4.1 or later.

<P>
<B>To Order</B>

<P>APARs may be ordered using FixDist or from the IBM Support Center.
For more information on FixDist reference URL:

<P>
<A HREF=http://aix.boulder.ibm.com/pbin-usa/fixdist.pl/>http://aix.boulder.ibm.com/pbin-usa/fixdist.pl/</A>

<P>or send e-mail to 
	<A HREF=mailto:aixserv@austin.ibm.com>aixserv@austin.ibm.com</A> 
with a subject of &quot;FixDist&quot;.

<P>
<H4>NEC Corporation</H4>

<P>
<PRE>
               OS               Version        Status
        ------------------   ------------   --------------------------
        EWS-UX/V(Rel4.0)     R1.x - R2.x    not vulnerable
                             R3.x - R6.x    vulnerable

        EWS-UX/V(Rel4.2)     R7.x - R10.x   vulnerable

        EWS-UX/V(Rel4.2MP)   R10.x          vulnerable

        UP-UX/V              R2.x           not vulnerable
                             R3.x - R4.x    vulnerable

        UP-UX/V(Rel4.2MP)    R5.x - R7.x    vulnerable

        UX/4800              R11.x          vulnerable

</PRE>

<P>The following is a workaround for 48 series.

<P>ypupdated program is started by the /etc/rc2.d/S75rpc script.
First, determine if the server is running, killing it if it
is. Then, rename ypupdated so that the /etc/rc2.d/S75rpc
script will not find and therefore start it when the system
reboots.

<P>
<PRE>
# uname -a
UNIX_System_V testux 4.2 1 R4000 r4000
# /sbin/ps -ef | /usr/bin/grep ypupdated
    root   359     1  0 08:20:05 ?        0:00 /usr/lib/netsvc/yp/ypupdated
    root 19938   836  0 23:13:20 pts/1    0:00 /usr/bin/grep ypupdated
# /usr/bin/kill 359
# /sbin/mv /usr/lib/netsvc/yp/ypupdated /usr/lib/netsvc/yp/ypupdated.CA-95.17
# /usr/bin/chmod 0 /usr/lib/netsvc/yp/ypupdated.CA-95.17

</PRE>

<P>Contacts for further information:<BR>
<A HREF=mailto:E-mail:UX48-security-support@nec.co.jp>E-mail:UX48-security-support@nec.co.jp</A> 

<P>
<H4>Open Software Foundation</H4>

<P>YP/NIS is not part of the OSF/1 Version 1.3 offering.<BR>
Hence, OSF/1 Version 1.3 is not vulnerable.

<P>
<H4>Sequent Computer Systems</H4>

<P>Sequent does not support the product referred to in this advisory, and
as such is not vulnerable.

<P>
<H4>Silicon Graphics Inc. (SGI)</H4>

<P>IRIX 3.x, 4.x, 5.0.x, 5.1.x, 5.2: vulnerable.<BR>
Turn off rpc.ypudated in inetd.conf; it is shipped with
this turned on.

<P>IRIX 5.3, 6.0, 6.0.1: rpc.ypupdated was off as distributed.<BR>
Turn off if you have turned it on.

<P>
<H4>Solbourne</H4>

<P>Not vulnerable.

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

<P>BUG 1230027/1232146   fixed in 4.1.3, will not fix 2.4

<P>The ypupdated program is no longer shipped with NS-KIT. If we do
decide in the future to support it again, we will fix the bug.

<P><HR>

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

<HR>

Revision History
<PRE>
Oct. 30, 1997  Updated vendor information for Sun.
Sep. 23, 1997  Updated copyright information
Aug. 30, 1996  Information previously in the README was inserted
               into the advisory.
Feb. 21, 1996  Appendix, IBM - added an entry for IBM
Dec. 18, 1995  Appendix, Digital &amp; Hewlett-Packard - modified information
</PRE>