From owner-doc-jp@jp.freebsd.org  Wed Nov  1 06:25:55 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id GAA99650;
	Wed, 1 Nov 2000 06:25:55 +0900 (JST)
	(envelope-from owner-doc-jp@jp.FreeBSD.org)
Received: from eos.ocn.ne.jp (eos.ocn.ne.jp [210.190.142.171])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id GAA99645
	for <doc-jp@jp.freebsd.org>; Wed, 1 Nov 2000 06:25:55 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Received: from mail.hrslab.yi.org (p0189-ip01funabasi.chiba.ocn.ne.jp [211.123.225.189])
	by eos.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id GAA12790
	for <doc-jp@jp.freebsd.org>; Wed, 1 Nov 2000 06:26:56 +0900 (JST)
Message-Id: <200010312126.GAA12790@eos.ocn.ne.jp>
Received: from localhost (alph.hrslab.yi.org [192.168.0.10])
	by mail.hrslab.yi.org (8.9.3/3.7W/DomainMaster) with ESMTP id GAA91216
	for <doc-jp@jp.freebsd.org>; Wed, 1 Nov 2000 06:09:37 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
To: doc-jp@jp.freebsd.org
In-Reply-To: <20001030231245.1BF7B37B4E5@hub.freebsd.org>
References: <20001030231245.1BF7B37B4E5@hub.freebsd.org>
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Wed_Nov__1_06:09:11_2000_41)--"
Content-Transfer-Encoding: 7bit
Date: Wed, 01 Nov 2000 06:09:36 +0900
From: Hiroki Sato <hrs@eos.ocn.ne.jp>
X-Dispatcher: imput version 20000228(IM140)
Lines: 204
Reply-To: doc-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: doc-jp 7776
Subject: [doc-jp 7776] Re: ANNOUNCE: FreeBSD Ports Security Advisory: FreeBSD-SA-00:60.boa
Errors-To: owner-doc-jp@jp.freebsd.org
Sender: owner-doc-jp@jp.freebsd.org
X-Originator: hrs@eos.ocn.ne.jp

----Next_Part(Wed_Nov__1_06:09:11_2000_41)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

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

 00:60 $B$NK]Lu$G$9!#(B

 document root $B$r$I$&$7$h$&$+LB$$$^$7$?$,!"LuCm$D$-$G(B
 $B86J8$N$^$^$H$7$^$7$?!#DI2C$7$?LuCm$b0l8@$G@bL@$7$E$i$+$C$?$N$G(B
 $BIT==J,$+$bCN$l$^$;$s!#(B

  # $B0U8+Jg=8!#(B

----Next_Part(Wed_Nov__1_06:09:11_2000_41)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Disposition: attachment; filename="00:60"
Content-Transfer-Encoding: 7bit

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

  Subject: ANNOUNCE: FreeBSD Ports Security Advisory: FreeBSD-SA-00:60.boa
  From: FreeBSD Security Advisories <security-advisories@freebsd.org>
  Date: Mon, 30 Oct 2000 15:12:45 -0800 (PST)
  Message-Id: <20001030231245.1BF7B37B4E5@hub.freebsd.org>
  X-Sequence: announce-jp 578

 $B$rF|K\8lLu$7$?$b$N$G$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(B, $BF|K\$N%_%i!<%5%$%H$,B8:_$7$^$9(B.
 $B%_%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.

 $B%M%C%H%o!<%/$N:.;($r4KOB$9$k$?$a(B, $B$^$:$O%_%i!<%5%$%H$NMxMQ$r(B
 $B9MN8$9$k$h$&$*4j$$$7$^$9(B.  $B%_%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(B, $B$^$?(B, $B2a5n$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.

 $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:60                                           Security Advisory
                                                                FreeBSD, Inc.

$B%H%T%C%/(B:	boa web server allows arbitrary file access/execution

$BJ,N`(B:		ports
$B%b%8%e!<%k(B:	boa
$B9pCNF|(B:		2000-10-30
$B%/%l%8%C%H(B:	Lluis Mora <llmora@S21SEC.COM>
$B1F6AHO0O(B:	$B=$@5F|0JA0$N(B Ports Collection
$B=$@5F|(B:		2000-10-07
$B%Y%s%@$NBP1~(B:	$B=$@5HG$,8x3+:Q$_(B
FreeBSD $B$K8GM-$+(B:	NO

I.   $BGX7J(B - Background

Boa is a high-performance web server.

boa $B$O9b$$%Q%U%)!<%^%s%9$r;}$C$?%&%'%V%5!<%P$G$9(B.

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

The boa port, versions after 0.92 but prior to 0.94.8.3, contains a
vulnerability which allows remote users to view arbitrary files
outside the document root.  The vulnerability is that boa does not
correctly restrict URL-encoded requests containing ".." in the path.

boa port $B$N%P!<%8%g%s(B 0.92 $B0J9_(B, 0.94.8.3 $B0JA0$N$b$N$K$O(B,
$B%j%b!<%H%f!<%6$,(B document root ($BLuCm(B: $B%&%'%V%5!<%P$,J8=q%U%!%$%k8!:w$N(B
$B%k!<%H$H$7$FMQ$$$k%Q%9$N$3$H(B) $B$N30$KB8:_$9$kG$0U$N%U%!%$%k$r8+$k$3$H$,(B
$B$G$-$k$h$&$J%;%-%e%j%F%#>e$N<eE@$,B8:_$7$^$9(B.  $B$3$N<eE@$O(B,
$B%Q%9$K(B ".." $B$r4^$`(B, URL $B%(%s%3!<%I$5$l$?MW5a$KBP$7$F(B boa $B$,(B
$BE,@Z$J@)8B$r9T$J$o$J$$$H$$$&$b$N$G$9(B.

In addition, if the administrator has enabled CGI extension support, a
request for any file ending in .cgi will result in the file being
executed with the privileges of the user id running the web server.
Since the .cgi file may reside outside the document root, this may
result in untrusted binaries/scripts being executed.  If an attacker
can upload files to the system, e.g. via anonymous FTP, they can cause
arbitrary code to be executed by the user running the web server.

$B$5$i$K%7%9%F%`4IM}<T$,(B CGI $B3HD%5!G=$N%5%]!<%H$rM-8z2=$7$F$$$k>l9g(B,
.cgi $B$G=*$o$k%U%!%$%k$X$NMW5a$,$"$k$H(B, $B%&%'%V%5!<%P$r<B9T$7$F$$$k(B
$B%f!<%6$N8"8B$G$=$N%U%!%$%k$,<B9T$5$l$^$9(B.  $B$3$3$G(B .cgi $B%U%!%$%k$,(B
document root $B$N30$KB8:_$7$F$$$k$H$9$l$P(B, $B?.Mj$G$-$J$$%P%$%J%j$d(B
$B%9%/%j%W%H$,<B9T$G$-$k$3$H$K$J$j$^$9(B.  $B$?$H$($P(B anonymous FTP $B$J$I$r(B
$B7PM3$7$F967b<T$,$=$N%7%9%F%`$K%U%!%$%k$r%"%C%W%m!<%I$G$-$k$J$i(B,
$B967b<T$O%&%'%V%5!<%P$r<B9T$7$F$$$k%f!<%6$N8"8B$G(B, $BG$0U$N%3!<%I$r(B
$B<B9T$9$k$3$H$,2DG=$G$9(B.

The boa port is not installed by default, nor is it "part of FreeBSD"
as such: it is part of the FreeBSD ports collection, which contains
over 4000 third-party applications in a ready-to-install format.
The ports collections shipped with FreeBSD 3.5.1 and 4.1.1 contain
this problem since it was discovered after the releases.

FreeBSD makes no claim about the security of these third-party
applications, although an effort is underway to provide a security
audit of the most security-critical ports.

boa $B$N(B port $B$O%G%U%)%k%H$G%$%s%9%H!<%k$5$l$k$b$N$G$O$J$/(B,
$B!V(BFreeBSD $B%7%9%F%`$N0lIt!W$r9=@.$9$k$b$N$G$b$"$j$^$;$s(B.
$B$=$l$i$O(B 4000 $B$r1[$($k%5!<%I%Q!<%F%#@=%"%W%j%1!<%7%g%s$,$9$0$K(B
$B%$%s%9%H!<%k$G$-$k7A$G<}$a$i$l$F$$$k(B FreeBSD Ports Collection $B$N0lIt$G$9(B.
$B%j%j!<%98e$KLdBj$,8+$D$+$C$?$?$a(B, FreeBSD 3.5.1 $B$*$h$S(B 4.1.1 $B$H$H$b$K(B
$B=P2Y$5$l$?(B Ports Collection $B$O$3$NLdBj$r4^$s$G$$$^$9(B.

FreeBSD $B$G$O(B, $B$3$N$h$&$J%5!<%I%Q!<%F%#@=%"%W%j%1!<%7%g%s$N%;%-%e%j%F%#(B
$BLdBj$KBP$7$F(B, $BFC$K2?$+$r<gD%$9$k$3$H$O$"$j$^$;$s(B ($BLuCm(B: Ports Collection $B$K(B
$BF~$C$F$$$k$+$i$H$$$C$F(B, FreeBSD $B$N3+H/<T$?$A$,$=$N%"%W%j%1!<%7%g%s$,(B
$B0BA4$G$"$k$HI>2A$7$?$o$1$G$O$"$j$^$;$s(B).  $B$?$@$7(B, $B%;%-%e%j%F%#LdBj$KBP$7$F(B
$BBg$-$J1F6A$r;}$D$h$&$J(B ports $B$KBP$9$k%;%-%e%j%F%#4F::$rDs6!$9$Y$/(B,
$B8=:_EXNOCf$G$9(B.

III. $B1F6AHO0O(B - Impact

Remote users may view any file on the system that is accessible by the
webserver account.  In addition, the webserver account may be
compromised due to the execution of arbitrary files outside the
document root.

$B%j%b!<%H%f!<%6$O%7%9%F%`$KB8:_$9$k(B, $B%&%'%V%5!<%P$N%f!<%6%"%+%&%s%H8"8B$G(B
$B%"%/%;%92DG=$J$9$Y$F$N%U%!%$%k$r8+$k$3$H$,$G$-$k2DG=@-$,$"$j$^$9(B.
$B$^$?(B, document root $B$N30$K$"$kG$0U$N%U%!%$%k$r<B9T$9$k$3$H$G(B,
$B%&%'%V%5!<%P$N%"%+%&%s%H$,C%$o$l$k4m81@-$,$"$j$^$9(B.

If you have not chosen to install the boa port/package, then your
system is not vulnerable to this problem.

boa $B$N(B port/package $B$r%$%s%9%H!<%k$7$F$$$J$1$l$P(B,
$B%7%9%F%`$K$3$NLdBj$K$h$k%;%-%e%j%F%#>e$N<eE@$O$"$j$^$;$s(B.

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

Deinstall the boa port/package, if you you have installed it.

boa $B$N(B port/package $B$,%$%s%9%H!<%k$5$l$F$$$k>l9g$O(B,
$B$=$l$r%7%9%F%`$+$i:o=|$7$F$/$@$5$$(B. 

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

One of the following:
$B<!$N$$$:$l$+$K=>$C$F$/$@$5$$(B.

1) Upgrade your entire ports collection and rebuild the boa port.
1) Ports Collection $BA4BN$r%"%C%W%0%l!<%I$7(B, boa $B$N(B port $B$r:F9=C[$7$^$9(B.

2) Deinstall the old package and install a new package dated after the
correction date, obtained from:
2) $B8E$$(B ($BLuCm(B: boa $B$N(B) package $B$r%7%9%F%`$+$i:o=|$7(B, $B=$@5F|0J9_$K(B
   $B:n@.$5$l$??7$7$$(B package $B$r0J2<$N>l=j$+$i<hF@$7$F%$%s%9%H!<%k$7$^$9(B.

ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-3-stable/www/boa-0.94.8.3.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/www/boa-0.94.8.3.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-4-stable/www/boa-0.94.8.3.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/www/boa-0.94.8.3.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/alpha/packages-5-current/www/boa-0.94.8.3.tgz

3) download a new port skeleton for the cvsweb port from:
3) boa port $B$N?7$7$$(B port $B%9%1%k%H%s$r0J2<$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/

and use it to rebuild the port.

    [$BLuCm(B] $B86J8$G$O(B cvsweb $B$H$J$C$F$$$^$9$,(B, $B8m5-$@$H;W$o$l$^$9(B.

4) 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:
4) $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.

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

$hrs: FreeBSD-SA/00:60,v 1.1 2000/10/31 21:00:53 hrs Exp $

----Next_Part(Wed_Nov__1_06:09:11_2000_41)----
