From owner-doc-jp-work@jp.FreeBSD.org Fri Feb 22 04:49:59 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g1LJnxL10794;
	Fri, 22 Feb 2002 04:49:59 +0900 (JST)
	(envelope-from owner-doc-jp-work@jp.FreeBSD.org)
Received: from eos.ocn.ne.jp (eos.ocn.ne.jp [210.190.142.171])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g1LJnwW10789
	for <doc-jp-work@jp.FreeBSD.org>; Fri, 22 Feb 2002 04:49:58 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Received: from mail.hrslab.yi.org (p0775-ip01funabasi.chiba.ocn.ne.jp [61.119.148.13])
	by eos.ocn.ne.jp (OCN) with ESMTP id EAA13086
	for <doc-jp-work@jp.FreeBSD.org>; Fri, 22 Feb 2002 04:49:56 +0900 (JST)
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 EAA67016
	for <doc-jp-work@jp.FreeBSD.org>; Fri, 22 Feb 2002 04:49:11 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Date: Fri, 22 Feb 2002 04:48:13 +0900 (JST)
Message-Id: <20020222.044813.74753180.hrs@eos.ocn.ne.jp>
To: doc-jp-work@jp.FreeBSD.org
From: Hiroki Sato <hrs@eos.ocn.ne.jp>
In-Reply-To: <200202211358.g1LDwSg16775@freefall.freebsd.org>
References: <200202211358.g1LDwSg16775@freefall.freebsd.org>
X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
 boundary="--Next_Part(Fri_Feb_22_04:48:13_2002_708)--"
Content-Transfer-Encoding: 7bit
Reply-To: doc-jp-work@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+011218
X-Sequence: doc-jp-work 169
Subject: [doc-jp-work 169] Re: ANNOUNCE: FreeBSD Ports Security Advisory
 FreeBSD-SA-02:12.squid
Errors-To: owner-doc-jp-work@jp.FreeBSD.org
Sender: owner-doc-jp-work@jp.FreeBSD.org
X-Originator: hrs@eos.ocn.ne.jp

----Next_Part(Fri_Feb_22_04:48:13_2002_708)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

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

 02:12 $B$G$9!#(B

--
| $B:4F#(B $B9-@8!wEl5~M}2JBg3X(B <hrs@eos.ocn.ne.jp>
|                         <hrs@FreeBSD.org> (FreeBSD Project)

----Next_Part(Fri_Feb_22_04:48:13_2002_708)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Disposition: inline; filename="02:12"
Content-Transfer-Encoding: 7bit


FreeBSD $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG(B
=============================================================================
FreeBSD-SA-02:12 (2002-02-21)
 * multiple security vulnerabilities in squid port
=============================================================================

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

  Subject: ANNOUNCE: FreeBSD Ports Security Advisory FreeBSD-SA-02:12.squid
  From: FreeBSD Security Advisories <security-advisories@FreeBSD.org>
  Date: Thu, 21 Feb 2002 05:58:28 -0800 (PST)
  Message-Id: <200202211358.g1LDwSg16775@freefall.freebsd.org>
  X-Sequence: announce-jp 937

 $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=$@5%Q%C%AEy$NFbMF$,2~$6$s$5$l$F$$$J$$$3$H$r3NG'$9$k$?$a$K(B PGP $B=pL>$N(B
 $B%A%'%C%/$r9T$J$&$K$O(B, $B86J8$r;2>H$7$F$/$@$5$$(B. 

 $BF|K\8lLu$*$h$S(B, $B%_%i!<%5%$%HMxMQ$N>\:Y$K$D$$$F$O(B, $BJ8Kv$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:12                                            Security Advisory
                                                                FreeBSD, Inc.

$B%H%T%C%/(B:	squid $B$N(B port $B$KB8:_$9$kJ#?t$N%;%-%e%j%F%#>e$N<eE@(B
		(multiple security vulnerabilities in squid port)

$BJ,N`(B:		ports
$B%b%8%e!<%k(B:	squid24
$B9pCNF|(B:		2002-02-21
$B%/%l%8%C%H(B:	Jouko Pynnonen <jouko@solutions.fi>
                Henrik Nordstrom <hno@squid-cache.org>
$B1F6AHO0O(B:	$B=$@5F|$h$jA0$N(B Ports Collection
$B=$@5F|(B:		2002-02-19 13:46:22 UTC
FreeBSD $B$K8GM-$+(B:	NO


I.   $BGX7J(B - Background

The Squid Internet Object Cache is a web proxy/cache.

Squid Internet Object Cache $B$O(B, web proxy/cache $B%=%U%H%&%'%"$N0l$D$G$9(B.


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

The following security vulnerabilities are known to exist in versions
of Squid prior to 2.4-STABLE4 (port version 2.4_8):

Squid $B$N%P!<%8%g%s(B 2.4-STABLE4  (port $B$N%P!<%8%g%s$G$O(B 2.4_8) $B$h$j(B
$BA0$N$b$N$K$O(B, $B<!$N$h$&$J%;%-%e%j%F%#>e$N<eE@$,B8:_$7$^$9(B.

1) The optional SNMP monitoring interface suffers from a memory leak.
The FreeBSD port does not normally include this code, but it can be
enabled with a compile-time option.

1) $B%*%W%7%g%s5!G=$N0l$D$G$"$k(B SNMP $B4F;k%$%s%?!<%U%'%$%9$K$O(B,
   $B%a%b%j%j!<%/LdBj$,$"$j$^$9(B.  FreeBSD $B$N(B port $B$G$O(B, $BI8=`$G(B
   $B$3$N%3!<%I$r4^$a$J$$$h$&$K$J$C$F$$$^$9$,(B, $B%3%s%Q%$%k;~$N(B
   $B%*%W%7%g%s$r@_Dj$9$k$HM-8z$K$9$k$3$H$,2DG=$G$9(B.

2) A buffer overflow exists in the code charged with parsing the
authentication portion of FTP URLs.

2) FTP URL $B$NG'>ZItJ,$N;z6g2r@O$r9T$J$&%3!<%I$K(B
   $B%P%C%U%!%*!<%P%U%m!<LdBj$,4^$^$l$F$$$^$9(B.

3) The optional HTCP interface can not be properly disabled at
run-time.  The FreeBSD port does not normally include this code, but
it can be enabled with a compile-time option.

3) $B%*%W%7%g%s5!G=$N0l$D$G$"$k(B HTCP $B%$%s%?!<%U%'%$%9$,<B9T;~$K(B
   $B$-$A$s$HL58z2=$5$l$J$$>l9g$,$"$j$^$9(B.  FreeBSD $B$N(B port $B$G$O(B, $BI8=`$G(B
   $B$3$N%3!<%I$r4^$a$J$$$h$&$K$J$C$F$$$^$9$,(B, $B%3%s%Q%$%k;~$N(B
   $B%*%W%7%g%s$r@_Dj$9$k$HM-8z$K$9$k$3$H$,2DG=$G$9(B.

The squid port is not installed by default, nor is it "part of
FreeBSD" as such: it is part of the FreeBSD ports collection, which
contains thousands of third-party applications in a ready-to-install
format. The ports collection shipped with FreeBSD 4.5 contains this
problem since it was discovered after the release.

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.

squid $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?t@i8D$K$*$h$V%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$3$N%;%-%e%j%F%#>e$N<eE@$O(B FreeBSD 4.5 $B$N%j%j!<%98e$KH=L@$7$?$b$N$G(B,
FreeBSD 4.5 $B$K<}O?$5$l$?(B Ports Collection $B$K$b(B, $B$3$NLdBj$,4^$^$l$F$$$^$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, $B$$$+$J$kJ]>Z$b$7$F$$$^$;$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

1) An attacker with the ability to send packets to the Squid SNMP port
can cause Squid to run out of memory and crash. (NOTE: The FreeBSD
port does not have SNMP enabled by default.)

1) Squid $B$N(B SNMP $B%]!<%H$K%Q%1%C%H$rAw?.$G$-$k967b<T$O(B, Squid $B$r(B
   $BMxMQ$7$F%a%b%j$r8O3i$5$;(B, $B%5!<%P$r%/%i%C%7%e$5$;$k$3$H$,2DG=$G$9(B
   ($BCm(B: FreeBSD $B$N(B port $B$NI8=`@_Dj$G$O(B, SNMP $B$OM-8z$K$J$C$F$$$^$;$s(B).

2) An authorized user of the squid proxy may submit a specially
crafted ftp:// request in order to crash the squid process, causing a
denial of service.  It may also be possible to cause the execution of
arbitrary code with the privilege level of the squid process, although
no such exploits are known to exist at this time.

2) Squid proxy $B$rMxMQ$G$-$k@55,$N%f!<%6$,FC<l$J(B ftp:// $B%j%/%(%9%H(B
   $B$rAw$k$3$H$G(B, Squid $B$N%W%m%;%9$r%/%i%C%7%e$5$;$F%5!<%S%9K832$r(B
   $B<B8=$9$k$3$H$,$G$-$k2DG=@-$,$"$j$^$9(B.  $B$^$?(B, $B8=;~E@$G$O6qBNE*$J(B
   $B0-MQJ}K!$,B8:_$9$k$+$I$&$+ITL@$G$9$,(B, Squid $B$N%W%m%;%9$,(B
   $B;}$D8"8B$GG$0U$N%3!<%I$r<B9T$G$-$k2DG=@-$b9M$($i$l$^$9(B.

3) Unauthorized users may utilize cache resources by using HTCP.
(NOTE: The FreeBSD port does not have HTCP enabled by default.)

3) $B5v2D$r<u$1$F$$$J$$%f!<%6$,(B HTCP $B$r;H$$(B, $B%-%c%C%7%e;q8;$rIT@5$K(B
   $BMxMQ$9$k$3$H$,$G$-$k2DG=@-$,$"$j$^$9(B
   ($BCm(B: FreeBSD $B$N(B port $B$NI8=`@_Dj$G$O(B, HTCP $B$OM-8z$K$J$C$F$$$^$;$s(B).


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

1) As regards the SNMP issue, the following configuration statement
will disable the SNMP support altogether:
1) SNMP $B$NLdBj$K$D$$$F$O(B, $B<!$N@_DjJ8$G(B SNMP $BBP1~$r40A4$KL58z$K(B
   $B$9$k$3$H$,$G$-$^$9(B.

        snmp_port 0

2) Optionally, set up a firewall rule to block incoming packets to the
Squid SNMP port (normally, UDP port 3401) from untrusted hosts.

2) 1) $B$K2C$($F(B, Squid SNMP $B%]!<%H(B ($BI8=`$G$O(B UDP $B%]!<%H(B 3401) $B$KBP$9$k(B
   $B?.Mj$G$-$J$$%[%9%H$+$i$NE~Ce%Q%1%C%H$r%V%m%C%/$9$k(B
   $B%U%!%$%"%&%)!<%k%k!<%k$r@_Dj$9$k$HNI$$$G$7$g$&(B.

3) For the second vulnerability, deny forwarding of non-anonymous FTP
URLs by inserting the following rules at the top of squid.conf, prior
to any http_access allow lines:
3) 2 $BHVL\$N<eE@$r2sHr$9$k$K$O(B, squid.conf $B$N@hF,(B (http_access allow $B9T$,(B
   $B8=$l$k$h$jA0(B) $B$K<!$N$h$&$J%k!<%k$rDI2C$7(B, anonymous FTP URL $B$G$J$$(B
   FTP URL $B$NE>Aw$r5qH]$5$;$^$9(B.

        acl non_anonymous_ftp url_regex -i ftp://[^/@]*@
        http_access deny non_anonymous_ftp

4) No workaround exists for the HTCP issue except to set up a firewall
rule to block incoming packets to the Squid HTCP port (normally, UDP
port 4827) from untrusted hosts.
4) HTCP $B$NLdBj$r2sHr$9$kJ}K!$O(B, Squid HTCP $B%]!<%H(B ($BI8=`$G$O(B UDP $B%]!<%H(B 4827)
   $B$KBP$9$k?.Mj$G$-$J$$%[%9%H$+$i$NE~Ce%Q%1%C%H$r%V%m%C%/$9$k(B
   $B%U%!%$%"%&%)!<%k%k!<%k$r@_Dj$9$k0J30$K$"$j$^$;$s(B.

5) Alternatively, deinstall the squid port/package.
5) $B$"$k$$$O(B, squid $B$N(B port/package $B$r%"%s%$%s%9%H!<%k$7$F$/$@$5$$(B.


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

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

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

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

[i386]
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/www/
   squid-2.4_8.tgz

ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/www/
   squid-2.4_8.tgz

[alpha]
Packages are not automatically generated for the alpha architecture at
this time due to lack of build resources.
$B8=;~E@$G$O(B alpha $B%"!<%-%F%/%A%cMQ$N(B package $B$O<+F0@8@.$5$l$F$$$^$;$s(B.
$B$3$l$O(B, $B9=C[$N$?$a$N%^%7%s%j%=!<%9$,ITB-$7$F$$$k$?$a$G$9(B.

NOTE: It may be several days before updated packages are available.
$BCm0U(B: $B99?7$5$l$?(B package $B$,Ds6!$5$l$k$^$G(B, $B?tF|$+$+$k2DG=@-$,$"$j$^$9(B.

3) Download a new port skeleton for the squid port from:
3) squid $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[$9$k(B.

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

and use it to rebuild the port.

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$&(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-4-stable/Latest/portcheckout.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/Latest/portcheckout.tgz


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

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

Path                                                             Revision
$B%Q%9L>(B                                                       $B%j%S%8%g%sHV9f(B
- -------------------------------------------------------------------------
ports/www/squid24/Makefile                                           1.87
ports/www/squid24/distinfo                                           1.63
- -------------------------------------------------------------------------


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

<URL:http://www.squid-cache.org/Versions/v2/2.4/bugs/>
<URL:http://www.squid-cache.org/Advisories/SQUID-2002_1.txt>


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(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.  

$B$?$@$7(B, $BK]Lu<T$*$h$S(B doc-jp $B$O(B, $B$=$NFbMF$K$D$$$F$$$+$J$kJ]>Z$b(B
$B$$$?$7$^$;$s$N$G$4Cm0U$/$@$5$$(B.  $BF|K\8lLu$K$D$$$F$N$40U8+(B, $B$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(B, $BF|K\$N%_%i!<%5%$%H$,B8:_$7$^$9(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.

$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^$`(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$^$H$a$i$l$F$$$^$9(B.

$hrs: announce-jp/FreeBSD-SA/02:12,v 1.1 2002/02/21 19:47:04 hrs Exp $

----Next_Part(Fri_Feb_22_04:48:13_2002_708)----
