From owner-doc-jp@jp.freebsd.org  Sun Sep  3 09:24:57 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id JAA87435;
	Sun, 3 Sep 2000 09:24:57 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from sv01.geocities.co.jp (sv01.geocities.co.jp [210.153.89.155])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id JAA87430
	for <doc-jp@jp.freebsd.org>; Sun, 3 Sep 2000 09:24:57 +0900 (JST)
	(envelope-from hrs@geocities.co.jp)
Received: from mail.geocities.co.jp (mail.geocities.co.jp [210.153.89.137]) by sv01.geocities.co.jp (8.9.3+3.2W/3.7W) with ESMTP id JAA06453 for <doc-jp@jp.freebsd.org>; Sun, 3 Sep 2000 09:24:56 +0900 (JST)
Received: from mail.hrs.jp (sutnmax1-ppp17.ed.noda.sut.ac.jp [133.31.173.27]) by mail.geocities.co.jp (1.3G-GeocitiesJ-3.3) with ESMTP id JAA28196 for <doc-jp@jp.freebsd.org>; Sun, 3 Sep 2000 09:24:54 +0900 (JST)
Message-Id: <200009030024.JAA28196@mail.geocities.co.jp>
Received: from localhost (alph.hrs.jp [192.168.0.10])
	by mail.hrs.jp (8.9.3/3.7W/DomainMaster) with ESMTP id JAA09963
	for <doc-jp@jp.freebsd.org>; Sun, 3 Sep 2000 09:05:34 +0900 (JST)
	(envelope-from hrs@hrs.jp)
To: doc-jp@jp.freebsd.org
In-Reply-To: <20000814224848.4311837B69B@hub.freebsd.org>
References: <20000814224848.4311837B69B@hub.freebsd.org>
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Date: Sun, 03 Sep 2000 09:05:32 +0900
From: Hiroki Sato <hrs@geocities.co.jp>
X-Dispatcher: imput version 990905(IM130)
Lines: 231
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: doc-jp 7667
Subject: [doc-jp 7667] Re: ANNOUNCE: FreeBSD Security Advisory: FreeBSD-SA-00:34.dhclient
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: hrs@geocities.co.jp

$B:4F#!wEl5~M}2JBg3X$G$9!#(B

 FreeBSD-SA-00:34.dhclient $B$NK]Lu$G$9!#(B

NOTES:
------
Solution $B$N$H$3$m$K(B cut & paste $B$N%_%9$,$"$j$^$9!#(B

=============================================================================


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

  Subject: ANNOUNCE: FreeBSD Security Advisory: FreeBSD-SA-00:34.dhclient
  From: FreeBSD Security Advisories <security-advisories@freebsd.org>
  Date: Mon, 14 Aug 2000 15:48:48 -0700 (PDT)
  Message-Id: <20000814224848.4311837B69B@hub.freebsd.org>
  X-Sequence: announce-jp 502

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

 $B86J8$O(B PGP $B=pL>$5$l$F$$$^$9$,(B, $B$3$NF|K\8lLu$O(B PGP $B=pL>$5$l$F$$$^$;$s(B. 
 $B%Q%C%AEy$NFbMF$,2~cb$5$l$F$$$J$$$3$H$r3NG'$9$k$?$a$K(B PGP $B$N%A%'%C%/$r(B
 $B9T$J$&$K$O(B, $B86J8$r;2>H$7$F$/$@$5$$(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$,;29M$N(B
 $B$?$a$KDs6!$9$k$b$N$G(B, doc-jp $B$O(B $B$=$NFbMF$K$D$$$F$$$+$J$kJ]>Z$b$$$?$7$^$;$s(B.
 $BF|K\8lLu$K$D$$$F$N$*Ld$$9g$o$;$O(B doc-jp@jp.FreeBSD.org $B$^$G$*4j$$$7$^$9(B.

--($B$3$3$+$i(B)
=============================================================================
FreeBSD-SA-00:34                                           Security Advisory
                                                                FreeBSD, Inc.

$B%H%T%C%/(B:	dhclient vulnerable to malicious dhcp server

$BJ,N`(B:	        core, ports
$B%b%8%e!<%k(B:	dhclient, isc-dhcp2 (ports), isc-dhcp3 (ports)
$B9pCNF|(B:         2000-08-14
$B1F6AHO0O(B:       All releases of FreeBSD after FreeBSD 3.2-RELEASE and
                prior to the correction date (including FreeBSD 4.0
                and 3.5, but not 4.1)
                Ports collection prior to the correction date.

                FreeBSD 3.2-RELEASE $B$H$=$l0J9_(B,
                $B=$@5F|0JA0$N$9$Y$F$N%j%j!<%9(B(FreeBSD 4.0 $B$H(B
                3.5 $B$,4^$^$l$^$9(B.  4.1 $B$O4^$^$l$^$;$s(B)
                $B=$@5F|0JA0$N(B Ports Collection

$B%/%l%8%C%H(B:	OpenBSD
$B%Y%s%@$NBP1~(B:	Updated version released
                $B=$@5HG$,8x3+:Q$_(B
$B=$@5F|(B:         2000-07-20 [FreeBSD 4.0 base system]
                2000-08-01 [isc-dhcp2 port]
                2000-07-21 [isc-dhcp3 port]
FreeBSD $B$K8GM-$+(B:	NO

I.   $BGX7J(B - Background

ISC-DHCP is an implementation of the DHCP protocol containing client
and server. FreeBSD 3.2 and above includes the version 2 client by
default in the base system, and the version 2 and version 3 clients
and servers in the Ports Collection.

ISC-DHCP $B$O%5!<%P$H%/%i%$%"%s%H$NN>J}$r4^$`(B DHCP $B%W%m%H%3%k<BAu$G$9!#(B
FreeBSD $B$N(B 3.2 $B$*$h$S$=$l0J9_$N%j%j!<%9$G$O(B, $B%Y!<%9%7%9%F%`$KI8=`$G(B
ISC-DHCP $B%P!<%8%g%s(B 2 $B$N%/%i%$%"%s%H$,(B, $B$^$?(B,
Ports Collection $B$K(B ISC-DHCP $B%P!<%8%g%s(B 2 $B$*$h$S(B 3 $B$N%/%i%$%"%s%H$H(B
$B%5!<%P$NN>J}$,4^$^$l$F$$$^$9(B.

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

The dhclient utility (DHCP client), versions 2.0pl2 and before (for
the version 2.x series), and versions 3.0b1pl16 and before (for the
version 3.x series) does not correctly validate input from the server,
allowing a malicious DHCP server to execute arbitrary commands as root
on the client. DHCP may be enabled if your system was initially
configured from a DHCP server at install-time, or if you have
specifically enabled it after installation.

dhclient $B%f!<%F%#%j%F%#(B (DHCP $B%/%i%$%"%s%H(B) $B$N(B
$B%P!<%8%g%s(B 2.0pl2 $B$H$=$l0JA0(B ($B%P!<%8%g%s(B 2.x $B7ONs(B) $B$*$h$S(B,
$B%P!<%8%g%s(B 3.0b1pl16 $B$H$=$l0JA0(B ($B%P!<%8%g%s(B 3.x $B7ONs(B) $B$O(B,
$B%5!<%P$+$i$NF~NO$,E,@Z$J$b$N$G$"$k$+$I$&$+$r@5$7$/8!::$7$^$;$s(B.
$B$=$N$?$a0-0U$N$"$k(B DHCP $B%5!<%P$O(B, $B%/%i%$%"%s%H>e$N(B root $B8"8B$G(B
$BG$0U$N%3%^%s%I$r<B9T$9$k$3$H$,2DG=$G$9(B.  $B%7%9%F%`$N%$%s%9%H!<%k;~$K(B
DHCP $B%5!<%P$+$i%7%9%F%`$r=i4|@_Dj$7$F$$$?$j(B, $B%$%s%9%H!<%k8e$K(B DHCP $B$r(B
$BM-8z2=$5$;$F$$$k$J$i(B, $B$=$N%7%9%F%`$G$O$*$=$i$/(B DHCP $B$,F0:n$7$F$$$^$9(B. 

FreeBSD 4.1 is not affected by this problem since it contains the
2.0pl3 client.

FreeBSD 4.1 $B$O%P!<%8%g%s(B 2.0pl3 $B$N(B DHCP $B%/%i%$%"%s%H$r4^$s$G$$$k$?$a(B,
$B$3$NLdBj$N1F6A$O$"$j$^$;$s(B.

III. $B1F6AHO0O(B - Impact

An attacker who has or gains control of a DHCP server may gain
additional root access to DHCP clients running vulnerable versions of
ISC-DHCP.

DHCP $B%5!<%P$N4IM}8"8B$r;}$C$F$$$k$+(B, $B4IM}8"8B$rF@$?967b<T$K$h$j(B,
$B%;%-%e%j%F%#>e$NLdBj$r4^$`%P!<%8%g%s$N(B ISC-DHCP $B$,F0:n$7$F$$$k(B
DHCP $B%/%i%$%"%s%H$N(B root $B8"8B$,C%$o$l$k4m81@-$,$"$j$^$9(B.

If you are not using dhclient to configure client machines via DHCP,
or your DHCP server is "trusted" according to your local security
policy, then this vulnerability does not apply to you.

$B%/%i%$%"%s%H%^%7%s$r(B DHCP $B7PM3$G@_Dj$9$k$N$K(B dhclient $B$r(B
$BMxMQ$7$F$$$J$+$C$?$j(B, $B$"$J$?$N%m!<%+%k%;%-%e%j%F%#%]%j%7$+$i(B,
DHCP $B%5!<%P$,!V?.Mj$G$-$k!W$b$N$G$"$k$HH=CG$G$-$k$J$i(B,
$B$3$N%;%-%e%j%F%#>e$N<eE@$OEv$F$O$^$j$^$;$s(B.

IV.  $B=$@5=hCV(B - Workaround

Disable the use of DHCP for configuring client machines: remove the
case-insensitive string "dhcp" from the "ifconfig_<foo>" directives in
/etc/rc.conf and replace it with appropriate static interface
configuration according to the rc.conf(5) manpage.

$B%/%i%$%"%s%H%^%7%s$N@_Dj$K(B DHCP $B$rMxMQ$7$J$$$h$&$K$7$F$/$@$5$$(B.
$B$=$l$K$O(B /etc/rc.conf $B$K4^$^$l$k(B "ifconfig_<foo>" $B$+$i(B "dhcp" $B$H$$$&(B
$BJ8;zNs(B ($BBgJ8;z>.J8;z$N6hJL$O$"$j$^$;$s(B) $B$r:o=|$7$^$9(B.  
$B$=$7$F$=$l$r(B, rc.conf(5) $B$N%^%K%e%"%k%Z!<%8$K1h$C$FE,@Z$K(B,
$B@EE*$J%$%s%?!<%U%'%$%9@_Dj$HCV$-49$($F$/$@$5$$(B.

An example of a DHCP-enabled interface is the following line in
/etc/rc.conf:

$B$?$H$($P(B, DHCP $B$,M-8z2=$5$l$F$$$k%$%s%?!<%U%'%$%9$O(B /etc/rc.conf $B$G(B
$B<!$N9T$N$h$&$K$J$C$F$$$^$9(B.

ifconfig_xl0="DHCP"

V.   $BBP1~:v(B - Solution

NOTE: At this time the FreeBSD 3.x branch has not yet been patched,
due to logistical difficulties. Users running a vulnerable 3.x system
are advised to either upgrade to FreeBSD 4.1, disable the use of
DHCP as described above, or use the dhclient binary from the isc-dhcp2
port dated after the correction date.

$BCm0U(B: FreeBSD 3.x $B%V%i%s%A$KBP$7$F=$@5%Q%C%A$rE,MQ$9$k$N$O:$Fq$J$?$a(B,
$B8=;~E@$G$O=$@5$O9T$J$o$l$F$$$^$;$s(B.  $B%;%-%e%j%F%#>e$N<eE@$r4^$`(B
FreeBSD 3.x $B%7%9%F%`$rMxMQ$7$F$$$k%f!<%6$O(B, FreeBSD 4.1 $B$K(B
$B%"%C%W%0%l!<%I$9$k$+(B, $B>e5-$N$h$&$K(B DHCP $B%5!<%P$rL58z2=$9$k$+(B,
$B$b$7$/$O=$@5F|0J9_$N(B isc-dhcp2 port $B$+$i9=C[$7$?(B dhclient $B%P%$%J%j$r(B
$BMxMQ$9$k$3$H$r?d>)$7$^$9(B.

1) Upgrade your vulnerable FreeBSD 4.0 system to a version dated after the
correction date. See

http://www.freebsd.org/handbook/makeworld.html

for instructions on how to upgrade and recompile your FreeBSD system
from source, or perform a binary upgrade, e.g. to FreeBSD 4.1-RELEASE,
described here:

http://www.freebsd.org/releases/4.1R/notes.html

1) $B%;%-%e%j%F%#>e$N<eE@$r4^$`(B FreeBSD 4.0 $B%7%9%F%`$r(B, $B=$@5F|0J9_$N(B
   $B%P!<%8%g%s$K%"%C%W%0%l!<%I$7$^$9(B.  FreeBSD $B%7%9%F%`$r%=!<%9$+$i(B
   $B:F9=C[$7$F%"%C%W%0%l!<%I$9$k<j=g$K4X$9$k>\:Y$O(B,

http://www.freebsd.org/handbook/makeworld.html

   $B$r(B, $B$^$?(B, $B%P%$%J%j%"%C%W%0%l!<%I$r9T$J$&<j=g(B, $B$?$H$($P(B
   FreeBSD 4.1-RELEASE $B$K%"%C%W%0%l!<%I$9$k>l9g$K$O(B
   $B<!$r;2>H$7$F$/$@$5$$(B.

http://www.freebsd.org/releases/4.1R/notes.html

2) (If using the isc-dhcp2 or isc-dhcp3 ports) One of the following:

2) ($B$b$7(B isc-dhcp2 $B$+(B isc-dhcp3 port $B$r;H$C$F$$$k$J$i(B)
   $B0J2<$N$$$:$l$+$K=>$C$F$/$@$5$$(B.

2a) Upgrade your entire ports collection and rebuild the isc-dhcp2 or isc-dhcp3 port.

2a) Ports Collection $BA4BN$r%"%C%W%0%l!<%I$7$F(B
    isc-dhcp2 $B$b$7$/$O(B isc-dhcp3 port $B$r:F9=C[$7$^$9(B.

2b) Deinstall the old package and install a new package dated after the
correction date, obtained from:

2b) ($BLuCm(B: isc-dhcp $B$N(B)$B8E$$(B package $B$r%7%9%F%`$+$i:o=|$7(B,
    $B0J2<$N>l=j$+$i=$@5F|0J9_$K:n@.$5$l$??7$7$$(B package $B$r<hF@$7$F(B
    $B%$%s%9%H!<%k$7$^$9(B.

[isc-dhcp3]

ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-3-stable/net/isc-dhcp3-3.0.b1.17.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/net/isc-dhcp3-3.0.b1.17.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-4-stable/net/isc-dhcp3-3.0.b1.17.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/net/isc-dhcp3-3.0.b1.17.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-5-current/net/isc-dhcp3-3.0.b1.17.tgz

NOTE: The isc-dhcp2 port is not available as a package.

$BCm0U(B: isc-dhcp2 port $B$N(B package $B$OMQ0U$5$l$F$$$^$;$s(B.

2c) download a new port skeleton for the isc-dhcp2 or isc-dhcp3 port from:

http://www.freebsd.org/ports/

and use it to rebuild the port.

2c) isc-dhcp2 $B$b$7$/$O(B isc-dhcp3 port $B$N?7$7$$(B port $B%9%1%k%H%s$r(B
    $B0J2<$N>l=j$+$i%@%&%s%m!<%I$7(B, $B$=$l$r;H$C$F(B port $B$r:F9=C[$7$^$9(B.

http://www.freebsd.org/ports/

2d) Use the portcheckout utility to automate option (3) above. The
portcheckout port is available in /usr/ports/devel/portcheckout or the
package can be obtained from:

2d) $B>e5-(B (3) $B$NA`:n$r<+F0E*$K9T$J$&(B portcheckout $B%f!<%F%#%j%F%#$r;H$$$^$9(B.
    portcheckout $B$N(B port $B$O(B /usr/ports/devel/portcheckout $B$K$"$j$^$9(B.
    $B$^$?(B, portcheckout $B$N(B package $B$,0J2<$N>l=j$+$iF~<j2DG=$G$9(B.

    [$BLuCm(B] portcheckout $B$O?7$7$$(B port $B%9%1%k%H%s$r%@%&%s%m!<%I$7(B,
           port $B$N:F9=C[$r<+F0E*$K9T$J$&%f!<%F%#%j%F%#$G$9(B.  
           $B86J8$G$O!V>e5-(B (3) (...option (3) above)$B!W(B $B$H=q$+$l$F$$$^$9$,(B,
           $B$3$N4+9p$K$O(B (3) $B$O$"$j$^$;$s$N$G(B, 2c) $B$N8m$j$@$H;W$o$l$^$9(B.

ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-3-stable/devel/portcheckout-2.0.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/devel/portcheckout-2.0.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-4-stable/devel/portcheckout-2.0.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/devel/portcheckout-2.0.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-5-current/devel/portcheckout-2.0.tgz
