From owner-doc-jp-work@jp.FreeBSD.org Fri Aug  2 08:12:20 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g71NCKr99597;
	Fri, 2 Aug 2002 08:12:20 +0900 (JST)
	(envelope-from owner-doc-jp-work@jp.FreeBSD.org)
Received: from wasley.bl.mmtr.or.jp (wasley.bl.mmtr.or.jp [210.228.160.21])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with SMTP/inet id g71NCJn99560
	for <doc-jp-work@jp.FreeBSD.org>; Fri, 2 Aug 2002 08:12:19 +0900 (JST)
	(envelope-from rushani@bl.mmtr.or.jp)
Received: (qmail 1966 invoked from network); 2 Aug 2002 08:12:16 +0900
Received: from unknown (HELO localhost) (210.165.137.196)
  by mx.bl.mmtr.or.jp with SMTP; 2 Aug 2002 08:12:16 +0900
Date: Fri, 02 Aug 2002 08:09:57 +0900 (JST)
Message-Id: <20020802.080957.105435807.rushani@bl.mmtr.or.jp>
To: doc-jp-work@jp.FreeBSD.org
From: Hideyuki KURASHINA <rushani@bl.mmtr.or.jp>
X-PGP-Public-Key: http://www.bl.mmtr.or.jp/~rushani/public_key.txt
X-PGP-Fingerprint: A052 6F98 6146 6FE3 91E2  DA6B F2FA 2088 439A DC57
X-URL: http://www.bl.mmtr.or.jp/~rushani/
X-Mailer: Mew version 3.0.54 on Emacs 21.2 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Fri_Aug__2_08:09:57_2002_982)--"
Content-Transfer-Encoding: 7bit
Reply-To: doc-jp-work@jp.FreeBSD.org
Precedence: list
X-Sequence: doc-jp-work 447
Subject: [doc-jp-work 447] Re: ANNOUNCE: FreeBSD Security Advisory FreeBSD-SA-02:34.rpc
 [REVISED]
Errors-To: owner-doc-jp-work@jp.FreeBSD.org
Sender: owner-doc-jp-work@jp.FreeBSD.org
X-Originator: rushani@bl.mmtr.or.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020727

----Next_Part(Fri_Aug__2_08:09:57_2002_982)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$BARIJ$G$9(B.

02:34 [REVISED] $B$G$9(B.

-- rushani

----Next_Part(Fri_Aug__2_08:09:57_2002_982)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="02:34"


FreeBSD $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG(B
=============================================================================
 (2002-08-01)
 * Sun RPC XDR decoder contains buffer overflow
=============================================================================

 $B$3$N%a!<%k$O!"(Bannounce-jp $B$KN.$l$?(B

  Subject: ANNOUNCE: FreeBSD Security Advisory FreeBSD-SA-02:34.rpc [REVISED]
  From: FreeBSD Security Advisories <security-advisories@FreeBSD.org>
  Date: Thu, 1 Aug 2002 05:34:24 -0700 (PDT)
  Message-Id: <200208011234.g71CYOCq000896@freefall.freebsd.org>
  X-Sequence: announce-jp 1020

 $B$rF|K\8lLu$7$?$b$N$G$9!#(B

 $B86J8$O(B PGP $B=pL>$5$l$F$$$^$9$,!"$3$NF|K\8lLu$O(B PGP $B=pL>$5$l$F$$$^$;$s!#(B
 $B=$@5%Q%C%AEy$NFbMF$,2~cb$5$l$F$$$J$$$3$H$r3NG'$9$k$?$a$K(B PGP $B=pL>$N(B
 $B%A%'%C%/$r9T$J$&$K$O!"86J8$r;2>H$7$F$/$@$5$$!#(B

 $BF|K\8lLu$*$h$S!"%_%i!<%5%$%HMxMQ$N>\:Y$K$D$$$F$O!"J8Kv$N!V(BA. FreeBSD
 $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG$K$D$$$F!W$r$4Mw$/$@$5$$!#(B


                                     [$BK]Lu<T(B: $B:4F#(B $B9-@8(B <hrs@jp.FreeBSD.org>]
--($B$3$3$+$i(B)
=============================================================================
FreeBSD-SA-02:34.rpc                                        Security Advisory
                                                          The FreeBSD Project

$B%H%T%C%/(B:	Sun RPC XDR $B%G%3!<%@$K$*$1$k%P%C%U%!%*!<%P%U%m!<(B
		(Sun RPC XDR decoder contains buffer overflow)
$BJ,N`(B:		core
$B%b%8%e!<%k(B:	libc
$B9pCNF|(B:		2002-08-01
$B%/%l%8%C%H(B:	ISS X-Force
$B1F6AHO0O(B:	4.6.1-RELEASE-p5 $B$r4^$`=$@5F|0JA0$N$9$Y$F$N(B FreeBSD
$B=$@5F|(B:		2002-08-01 12:23:20 UTC (RELENG_4)
                2002-08-01 12:23:40 UTC (RELENG_4_6)
                2002-08-01 12:23:58 UTC (RELENG_4_5)
                2002-08-01 12:24:20 UTC (RELENG_4_4)
FreeBSD $B$K8GM-$+(B:	NO

0.   $B2~D{MzNr(B - Revision History

v1.0  2002-07-31  Initial release
v1.1  2002-08-01  Corrected patch

I.   $BGX7J(B - Background

Sun RPC is a remote procedure call framework which allows clients
to invoke procedures in a server process over a network somewhat
transparently.  XDR is a mechanism for encoding data structures for
use with RPC.  NFS, NIS, and many other network services are built
upon Sun RPC.
Sun RPC $B$O!"%M%C%H%o!<%/1[$7$K%/%i%$%"%s%H$X%5!<%P%W%m%;%9$X$N<jB3$-$r(B
$BF)2aE*$KMW5a$9$k$3$H$r2DG=$K$9$k%j%b!<%H%W%m%7!<%8%c%3!<%k%U%l!<%`%o!<%/$G$9!#(B
XDR $B$O(B RPC $B$NMxMQ$K:]$7$F%G!<%?9=B$$r%(%s%3!<%I$9$k$?$a$N5!9=$G$9!#(B
NFS$B!"(BNIS $B$=$7$FB>$N%M%C%H%o!<%/%5!<%S%9$NB?$/$,(B Sun RPC $B$r4pHW$H$7$F(B
$B@.$jN)$C$F$$$^$9!#(B

The FreeBSD C runtime library (libc) contains an XDR encoder/decoder
derived from Sun's RPC implementation.
FreeBSD C $B%i%s%?%$%`%i%$%V%i%j(B (libc) $B$K$O(B Sun $B<R$N(B RPC $B$N<BAu$KGI@8$7$?(B
XDR $B%(%s%3!<%@(B / $B%G%3!<%@$,4^$^$l$F$$$^$9!#(B

II.  $BLdBj$N>\:Y(B - Problem Description

An error in the calculation of memory needed for unpacking arrays in
the XDR decoder can result in a heap buffer overflow.
XDR $B%G%3!<%@$NCf$N$^$@E83+$5$l$F$$$J$$G[Ns$KI,MW$J%a%b%j$N7W;;$K$*$1$k(B
$B%(%i!<$,%R!<%W%P%C%U%!%*!<%P%U%m!<$K$D$J$,$k$3$H$,$"$j$^$9!#(B

III. $B1F6AHO0O(B - Impact

Any application using Sun RPC may be vulnerable to the heap buffer
overflow.  Depending upon the application, this vulnerability may be
exploitable and lead to arbitrary code execution.
Sun RPC $B$rMxMQ$7$F$$$k%"%W%j%1!<%7%g%s$O%R!<%W%P%C%U%!%*!<%P%U%m!<$K(B
$BBP$7$F@H<e@-$r;}$D2DG=@-$,$"$j$^$9!#%"%W%j%1!<%7%g%s$K$h$C$F$O!"$3$N(B
$B@H<e@-$N$?$a$K0-MQ$5$l$k2DG=@-$,$"$j!"$=$7$FG$0U$N%3!<%I$r<B9T$5$l$k(B
$B$3$H$K$D$J$,$j$($^$9!#(B

Though no exploits are known to exist currently, many RPC-based
services run as the superuser (such as NFS, the NIS server, rpc.statd,
and others) and thus this vulnerability should be considered
high-risk.
$B:#$N$H$3$m!"0-MQJ}K!$H$7$FB8:_$9$k$b$N$O$"$j$^$;$s$,!"B?$/$N(B RPC $B$K(B
$B4p$E$$$?%5!<%S%9(B (NFS$B!"(BNIS $B%5!<%P!"(Brpc.statd $B$J$I(B) $B$O(B
$B%9!<%Q!<%f!<%68"8B$GF0:n$9$k$?$a!"$3$N@H<e@-$O9b$$4m81@-$r$O$i$s$G$$$k(B
$B$H$$$&$3$H$r9MN8$9$Y$-$G$9!#(B

No RPC-based services are enabled by default in FreeBSD installations.
$B$J$*!"(BFreeBSD $B$r%$%s%9%H!<%k$7$?;~!"%G%U%)%k%H$G(B RPC $B$K4p$E$$$?%5!<%S%9$O(B
$BM-8z2=$5$l$F$$$^$;$s!#(B

IV.  $B2sHrJ}K!(B - Workaround

Do not run any RPC-based services.  The RPC-based services running
on a machine may be determined by:
RPC $B$K4p$E$$$?%5!<%S%9$rDs6!$9$k$N$r;_$a$F$/$@$5$$!#%^%7%s$N>e$G(B
$BDs6!$5$l$F$$$k(B RPC $B$K4p$E$$$?%5!<%S%9$O0J2<$N$h$&$K$7$F8!=P$9$k$3$H$,(B
$B$G$-$^$9(B:

  # rpcinfo -p <hostname>

To disable any RPC-based services at next boot, add (or change if it
is already present) the following lines in /etc/rc.conf:
$B<!2s$N5/F0;~$K(B RPC $B$K4p$E$$$?%5!<%S%9$rL58z2=$9$k$K$O!"0J2<$N9T$r(B
/etc/rc.conf $B$KDI2C(B ($B$b$7$=$l$,$9$G$KB8:_$9$l$PJQ99(B) $B$7$F$/$@$5$$(B:

  portmap_enable="NO"
  nfs_client_enable="NO"
  nfs_server_enable="NO"
  nis_client_enable="NO"
  nis_server_enable="NO"

V.   $B2r7h:v(B - Solution

Do one of the following:
$B<!$N$&$A$N$R$H$D$r9T$C$F$/$@$5$$(B:

1) Upgrade your vulnerable system to 4.6-STABLE; or to the RELENG_4_6,
RELENG_4_5, or RELENG_4_4 security branch dated after the correction
date (4.6.1-RELEASE-p6, 4.5-RELEASE-p15, or 4.4-RELEASE-p22).
1) $B<eE@$r;}$C$?(B FreeBSD $B%7%9%F%`$r=$@5F|0J9_$N(B 4.6-STABLE$B!"$b$7$/$O(B
   RELENG_4_6$B!"(BRELENG_4_5$B!"(BRELENG_4_4 $B%;%-%e%j%F%#%V%i%s%A$N$$$:$l$+(B
   (4.6.1-RELEASE-p6, 4.5-RELEASE-p15, or 4.4-RELEASE-p22) $B$K(B
   $B%"%C%W%0%l!<%I$9$k!#(B

2) To patch your present system:
2) $B8=:_$N%7%9%F%`$K%Q%C%A$rE,MQ$9$k$K$O(B:

The following patch has been verified to apply to FreeBSD 4.4, 4.5,
and 4.6 systems.
$B0J2<$N=$@5%Q%C%A$O!"(BFreeBSD 4.6$B!"(B4.5$B!"(B4.4-RELEASE $B$KE,MQ$G$-$k$3$H$,(B
$B3NG'$5$l$F$$$k$b$N$G$9!#(B

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
a) $B0J2<$N>l=j$+$i=$@5%Q%C%A$r%@%&%s%m!<%I$7!"(BPGP $B%f!<%F%#%j%F%#$r;H$C$F(B
   PGP $B=pL>$r3NG'$7$^$9!#(B

# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:34/rpc.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:34/rpc.patch.asc

b) Execute the following commands as root:
b) root $B$G0J2<$N%3%^%s%I$r<B9T$7$^$9(B:

# cd /usr/src
# patch < /path/to/patch

c) Recompile the operating system as described in
<URL:http://www.freebsd.org/doc/handbook/makeworld.html>.
c) $B0J2<$K5-=R$5$l$F$$$k$h$&$K!"%*%Z%l!<%F%#%s%0%7%9%F%`$r(B
   $B:F%3%s%Q%$%k$7$^$9!#(B
<URL:http://www.freebsd.org/doc/handbook/makeworld.html>.

Note that any statically linked applications that are not part of
the base system (i.e. from the Ports Collection or other 3rd-party
sources) must be recompiled if they use Sun RPC.
$B%Y!<%9%7%9%F%`$N9=@.J*$K4^$^$l$J$$!"@EE*$K%j%s%/$5$l$?%"%W%j%1!<%7%g%s(B
($B$9$J$o$A(B Ports Collection $B$+$i%S%k%I$7$?$b$N$d!"%5!<%I%Q!<%F%#$N(B
$B%=!<%9(B) $B$,(B Sun RPC $B$rMxMQ$7$F$$$k$J$i$P!":F%3%s%Q%$%k$7$J$1$l$P$J$i$J$$(B
$B$H$$$&$3$H$KCm0U$7$F$/$@$5$$!#(B

All affected applications must be restarted in order to use the
corrected library.  Though it is not required, rebooting may be the
easiest way to accomplish this.
$B1F6A$r<u$1$k$9$Y$F$N%"%W%j%1!<%7%g%s$O!"=$@5$5$l$?%i%$%V%i%j$r(B
$B8z2L$r$($k$?$a$K:F5/F0$7$J$1$l$P$J$j$^$;$s!#$3$l$r9T$&$K$O!"%7%9%F%`$r(B
$B:F5/F0$9$k$3$H$,$*$=$i$/:G$b4JC1$JJ}K!$G$7$g$&(B ($BI,?\$G$O$"$j$^$;$s(B)$B!#(B

VI.  $B=$@5$N>\:Y(B - Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.
$B<!$NI=$O!":#2s=$@5$5$l$?(B FreeBSD $B$K4^$^$l$k3F%U%!%$%k$N%j%S%8%g%sHV9f$G$9!#(B

Path                                                             Revision
  Branch
- -------------------------------------------------------------------------
src/lib/libc/xdr/xdr_array.c
  RELENG_4                                                        1.8.2.3
  RELENG_4_6                                                     1.8.10.4
  RELENG_4_5                                                      1.8.8.3
  RELENG_4_4                                                      1.8.6.3
src/sys/conf/newvers.sh
  RELENG_4_6                                               1.44.2.23.2.11
  RELENG_4_5                                               1.44.2.20.2.16
  RELENG_4_4                                               1.44.2.17.2.21
- -------------------------------------------------------------------------

VII. $B;29M;qNA(B - References

<URL:http://online.securityfocus.com/archive/1/285308>
<URL:http://bvlive01.iss.net/issEn/delivery/xforce/alertdetail.jsp?oid=20823>

A.   FreeBSD $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG$K$D$$$F(B

$BF|K\8lLu$O(B FreeBSD $BF|K\8l%I%-%e%a%s%F!<%7%g%s%W%m%8%'%/%H(B (doc-jp) $B$,(B
$B;29M$N$?$a$KDs6!$9$k$b$N$G$9!#2a5n$NF|K\8lHG%;%-%e%j%F%#4+9p$O(B

 http://www.FreeBSD.org/ja/security/

$B$K$^$H$a$i$l$F$$$^$9!#(B

$B$?$@$7!"K]Lu<T$*$h$S(B doc-jp $B$O!"$=$NFbMF$K$D$$$F$$$+$J$kJ]>Z$b(B
$B$$$?$7$^$;$s$N$G$4Cm0U$/$@$5$$!#F|K\8lLu$K$D$$$F$N$40U8+!"$4MWK>!"(B
$B$*Ld$$9g$o$;Ey$O(B doc-jp@jp.FreeBSD.org $B$^$G$*4j$$$7$^$9!#(B

$B$3$N4+9p$NCf$G>R2p$5$l$F$$$k(B WWW $B%5%$%H(B http://www.FreeBSD.org/ $B$*$h$S(B
FTP $B%5%$%H(B ftp://ftp.FreeBSD.org/ $B$K$O!"F|K\$N%_%i!<%5%$%H$,B8:_$7$^$9!#(B
$B%M%C%H%o!<%/$N:.;($r4KOB$9$k$?$a!"$^$:$O%_%i!<%5%$%H$NMxMQ$r(B
$B9MN8$9$k$h$&$*4j$$$7$^$9!#(B

$BF|K\$N%_%i!<%5%$%H$rMxMQ$9$k$K$O!"(B
http://www.FreeBSD.org/ $B$r(B http://www.jp.FreeBSD.org/www.freebsd.org/ $B$K!"(B
ftp://ftp.FreeBSD.org/ $B$r(B ftp://ftp.jp.FreeBSD.org/ $B$K!"(B
$B$=$l$>$lCV$-49$($F$/$@$5$$!#(B

$BB>$NCO0h$r4^$`!"%_%i!<%5%$%H$K4X$9$k>\:Y$O!"(B

 http://www.FreeBSD.org/handbook/mirror.html ($B1QJ8(B)
 http://www.FreeBSD.org/ja/handbook/mirror.html ($BF|K\8lLu(B)

$B$K$^$H$a$i$l$F$$$^$9!#(B

$hrs$

----Next_Part(Fri_Aug__2_08:09:57_2002_982)----
