From owner-doc-jp@jp.FreeBSD.org Sat Jan  5 22:20:26 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g05DKQ289127;
	Sat, 5 Jan 2002 22:20:26 +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.11.6+3.4W/8.11.3) with ESMTP/inet id g05DKPm89122
	for <doc-jp@jp.FreeBSD.org>; Sat, 5 Jan 2002 22:20:25 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Received: from mail.hrslab.yi.org (p5126-ip02funabasi.chiba.ocn.ne.jp [61.214.4.126])
	by eos.ocn.ne.jp (OCN) with ESMTP id WAA28938
	for <doc-jp@jp.FreeBSD.org>; Sat, 5 Jan 2002 22:20:19 +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 WAA97393
	for <doc-jp@jp.FreeBSD.org>; Sat, 5 Jan 2002 22:20:20 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Date: Sat, 05 Jan 2002 22:18:45 +0900 (JST)
Message-Id: <20020105.221845.74752357.hrs@eos.ocn.ne.jp>
To: doc-jp@jp.FreeBSD.org
From: Hiroki Sato <hrs@eos.ocn.ne.jp>
In-Reply-To: <200201050104.g0514Xw93049@freefall.freebsd.org>
References: <200201050104.g0514Xw93049@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(Sat_Jan__5_22:18:45_2002_031)--"
Content-Transfer-Encoding: 7bit
Reply-To: doc-jp@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+011218
X-Sequence: doc-jp 8605
Subject: [doc-jp 8605] Re: ANNOUNCE: FreeBSD Ports Security Advisory
 FreeBSD-SA-02:03.mod_auth_pgsql
Errors-To: owner-doc-jp@jp.FreeBSD.org
Sender: owner-doc-jp@jp.FreeBSD.org
X-Originator: hrs@eos.ocn.ne.jp

----Next_Part(Sat_Jan__5_22:18:45_2002_031)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

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

 02:03-05 $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(Sat_Jan__5_22:18:45_2002_031)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Disposition: inline; filename="02:03"
Content-Transfer-Encoding: 7bit


FreeBSD $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG(B
=============================================================================
FreeBSD-SA-02:03 (2002-01-04)
 * mod_auth_pgsql port authentication bypass
=============================================================================

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

  Subject: ANNOUNCE: FreeBSD Ports Security Advisory FreeBSD-SA-02:03.mod_auth_pgsql
  From: FreeBSD Security Advisories <security-advisories@FreeBSD.ORG>
  Date: Fri, 4 Jan 2002 17:04:33 -0800 (PST)
  Message-Id: <200201050104.g0514Xr93057@freefall.freebsd.org>
  X-Sequence: announce-jp 886

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

$B%H%T%C%/(B:	mod_auth_pgsql $B$N(B port $B$K$*$1$kG'>Z$N5!G=ITA4(B
                (mod_auth_pgsql port authentication bypass)

$BJ,N`(B:		ports
$B%b%8%e!<%k(B:	mod_auth_pgsql
$B9pCNF|(B:		2002-01-04
$B%/%l%8%C%H(B:	RUS CERT <URL:http://cert.uni-stuttgart.de/>
$B1F6AHO0O(B:	$B=$@5F|0JA0$N(B Ports Collection
$B=$@5F|(B:		2001-10-02 11:33:49 UTC
FreeBSD $B$K8GM-$+(B:	NO


I.   $BGX7J(B - Background

mod_auth_pgsql is an Apache module which allows the Apache web server
to use a PostgreSQL database for user and/or group authentication.

mod_auth_pgsql $B$O(B, Apache $B%&%'%V%5!<%P$K$*$$$F%f!<%6$d%0%k!<%W$NG'>Z$K(B
PostgreSQL $B%G!<%?%Y!<%9$rMxMQ$G$-$k$h$&$K$9$k$?$a$N(B Apache $B%b%8%e!<%k$G$9(B.


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

The mod_auth_pgsql port, versions prior to mod_auth_pgsql-0.9.9,
contain a vulnerability that may allow a remote user to cause
arbitrary SQL code to be execute.  mod_auth_pgsql constructs a SQL
statement to be executed by the PostgreSQL server in order to lookup
user information.  The username given by the remote user is inserted
into the SQL statement without any quoting or other safety checks.

mod_auth_pgsql $B$N(B port $B$N(B mod_auth_pgsql-0.9.9 $B$h$jA0$N%P!<%8%g%s$K$O(B,
$B%j%b!<%H%f!<%6$,G$0U$N(B SQL $B%3!<%I$r<B9T$G$-$k$H$$$&%;%-%e%j%F%#>e$N(B
$B<eE@$,4^$^$l$F$$$^$9(B.  mod_auth_pgsql $B$O(B, PostgreSQL $B%5!<%P$G<B9T$5$l$k(B
$B%f!<%6>pJs$r8!:w$9$k$?$a$N(B SQL $B<B9TJ8$r9=@.$9$k$N$G$9$,(B,
$B%j%b!<%H%f!<%6$K$h$C$F;XDj$5$l$?%f!<%6L>$O(B, $B0BA4@-$N8!::$r(B
$B$^$C$?$/<u$1$:$K$=$N$^$^(B SQL $B<B9TJ8$KA^F~$5$l$F$7$^$C$F$$$^$9(B.

The mod_auth_pgsql 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 6000 third-party applications in a ready-to-install
format. The ports collection shipped with FreeBSD 4.4 contains this
problem since it was discovered after the release.

mod_auth_pgsql $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 6000 $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$3$NLdBj$O(B FreeBSD 4.4 $B$N%j%j!<%98e$KH/8+!&=$@5$5$l$?$?$a(B,
FreeBSD 4.4 $B$K$O$3$NLdBj$K$h$k%;%-%e%j%F%#>e$N<eE@$,4^$^$l$F$$$^$9(B.

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.

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

A remote user may insert arbitrary SQL code into the username during
authentication, leading to several exploit opportunities.  In
particular, the attacker may cause mod_auth_pgsql to use a known fixed
password hash for user verification, allowing him to authenticate as
any user and obtain unauthorized access to web server data.

$B%j%b!<%H$N%f!<%6$OG'>Z$N:]$K%f!<%6L>ItJ,$KG$0U$N(B SQL $B%3!<%I$rA^F~$7(B,
$B$3$N%;%-%e%j%F%#>e$N<eE@$r0-MQ$G$-$k4m81@-$,$"$j$^$9(B.  $BFC$K(B, $B967b<T$,(B
mod_auth_pgsql $B$KBP$7$F(B, $B%f!<%6G'>Z$K8GDj$N%Q%9%o!<%I%O%C%7%e$r;H$o$;$k(B
$B$3$H$,$G$-$k2DG=@-$,$"$j$^$9(B.  $B$3$l$K$h$j(B, $B3F%f!<%6$9$Y$F$KBP$9$kG'>Z$r(B
$BDL2a$7$F%&%'%V%5!<%P$N%G!<%?$rIT@5$K%"%/%;%9$9$k$3$H$,2DG=$G$9(B.


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

1) Deinstall the mod_auth_pgsql port/package if you have it installed.
1) mod_auth_pgsql $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$^$9(B.


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

1) Upgrade your entire ports collection and rebuild the port.
1) Ports Collection $BA4BN$r%"%C%W%0%l!<%I$7(B mod_auth_pgsql $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: mod_auth_pgsql $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/mod_auth_pgsql-0.9.9.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/www/mod_auth_pgsql-0.9.9.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.

3) Download a new port skeleton for the mod_auth_pgsql port from:
3) mod_auth_pgsql $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/devel/portcheckout-2.0.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/devel/portcheckout-2.0.tgz


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

The following list contains the $FreeBSD$ revision numbers of each
file that was corrected in the FreeBSD source

$B<!$NI=$O(B, $B:#2s=$@5$5$l$?(B FreeBSD $B$N%=!<%9%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/mod_auth_pgsql/Makefile                                     1.3
ports/www/mod_auth_pgsql/distinfo                                     1.2
- -------------------------------------------------------------------------


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

<URL:http://cert.uni-stuttgart.de/advisories/apache_auth.php>


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:03,v 1.4 2002/01/05 13:17:54 hrs Exp $

----Next_Part(Sat_Jan__5_22:18:45_2002_031)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Disposition: inline; filename="02:04"
Content-Transfer-Encoding: 7bit


FreeBSD $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG(B
=============================================================================
FreeBSD-SA-02:04 (2002-01-04)
 * mutt ports contain remotely exploitable buffer overflow
=============================================================================

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

  Subject: ANNOUNCE: FreeBSD Ports Security Advisory FreeBSD-SA-02:04.mutt
  From: FreeBSD Security Advisories <security-advisories@FreeBSD.ORG>
  Date: Fri, 4 Jan 2002 17:04:43 -0800 (PST)
  Message-Id: <200201050104.g0514h793151@freefall.freebsd.org>
  X-Sequence: announce-jp 887

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

$B%H%T%C%/(B:	mutt $B$N(B port $B$K$*$1$k%j%b!<%H$+$i0-MQ2DG=$J(B
                $B%P%C%U%!%*!<%P%U%m!<LdBj(B
                (mutt ports contain remotely exploitable buffer overflow)

$BJ,N`(B:		ports
$B%b%8%e!<%k(B:	mutt
$B9pCNF|(B:		2002-01-04
$B%/%l%8%C%H(B:	Joost Pol <joost@contempt.nl>
$B1F6AHO0O(B:	$B=$@5F|0JA0$N(B Ports Collection
$B=$@5F|(B:		2002-01-02 13:52:03 UTC (ports/mail/mutt: 1.2.x)
                2002-01-02 03:39:01 UTC (ports/mail/mutt-devel: 1.3.x)
FreeBSD $B$K8GM-$+(B:	NO


I.   $BGX7J(B - Background

Mutt is a small but very powerful text-based mail client for Unix
operating systems.

mutt $B$O%3%s%Q%/%H$J$,$i$bB?5!G=$J(B, Unix $B%*%Z%l!<%F%#%s%0%7%9%F%`MQ$N(B
$B%F%-%9%H%Y!<%9$N%a!<%k%/%i%$%"%s%H$G$9(B.


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

The mutt ports, versions prior to mutt-1.2.25_1 and
mutt-devel-1.3.24_2, contain a buffer overflow in the handling of
email addresses in headers.

mutt $B$N(B port $B$N(B mutt-1.2.5_1 $B$*$h$S(B mutt-devel-1.3.24_2 $B$h$jA0$N$b$N(B
$B$K$O(B, $B%X%C%@$N%a!<%k%"%I%l%9$N=hM}ItJ,$K%P%C%U%!%*!<%P%U%m!<LdBj$,(B
$B4^$^$l$F$$$^$9(B.

The mutt and mutt-devel ports are not installed by default, nor are
they "part of FreeBSD" as such: they are parts of the FreeBSD ports
collection, which contains over 6000 third-party applications in a
ready-to-install format. The ports collection shipped with FreeBSD 4.4
contains this problem since it was discovered after the release.

mutt $B$*$h$S(B mutt-devel $B$N(B port $B$O$$$:$l$b%G%U%)%k%H$G(B
$B%$%s%9%H!<%k$5$l$k$b$N$G$O$J$/(B,$B!V(BFreeBSD $B%7%9%F%`$N0lIt!W$r(B
$B9=@.$9$k$b$N$G$b$"$j$^$;$s(B.
$B$=$l$i$O(B 6000 $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$3$NLdBj$O(B FreeBSD 4.4 $B$N%j%j!<%98e$KH/8+!&=$@5$5$l$?$?$a(B,
FreeBSD 4.4 $B$K$O$3$NLdBj$K$h$k%;%-%e%j%F%#>e$N<eE@$,4^$^$l$F$$$^$9(B.

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.

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

An attacker may send an email message with a specially crafted email
address in any of several message headers to the victim.  When the
victim reads the message using mutt and encounters that email address,
the buffer overflow is triggered and may result in arbitrary code
being executed with the privileges of the victim.

$B967b<T$O(B, $BFC<l$J:Y9)$r;\$7$?%a!<%k%"%I%l%9$r%a%C%;!<%8%X%C%@$N$$$:$l$+$K(B
$B;E9~$s$@%a!<%k%a%C%;!<%8$r967bBP>]$KAw$C$?$H$7$^$9(B.  $B$=$N%a!<%k$r(B
$B967bBP>]$H$J$C$?%f!<%6$,(B mutt $B$r;H$C$FFI$s$@>l9g(B, $B$A$g$&$I(B
$B$=$N%a!<%k%"%I%l%9$K$5$7$+$+$C$?;~$K%P%C%U%!%*!<%P%U%m!<$r(B
$BH/@8$5$;$k$3$H$,2DG=$G$9(B.  $B$3$l$O(B, $B967bBP>]$N%f!<%68"8B$G(B
$BG$0U$N%3!<%I$r<B9T$9$k$3$H$r2DG=$G$"$k$3$H$r0UL#$7$^$9(B.


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

1) Deinstall the mutt and mutt-devel ports/packages if you have them
installed.
1) mutt $B$*$h$S(B mutt-devel $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$^$9(B.


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

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

2) Deinstall the old packages and install news package dated after the
correction date, obtained from the following directories:
2) $B8E$$(B ($BLuCm(B: mutt $B$*$h$S(B mutt-devel $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/mail/mutt-1.2.5_1.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/mail/mutt-devel-1.3.24_2.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/mail/mutt-1.2.5_1.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/mail/mutt-devel-1.3.24_2.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 mutt or mutt-devel port from:
3) mutt $B$*$h$S(B mutt-devel $B$N?7$7$$(B port $B%9%1%k%H%s$r0J2<$N>l=j$+$i(B
   $B%@%&%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/devel/portcheckout-2.0.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/devel/portcheckout-2.0.tgz


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

The following list contains the $FreeBSD$ revision numbers of each
file that was corrected in the FreeBSD source
$B<!$NI=$O(B, $B:#2s=$@5$5$l$?(B FreeBSD $B$N%=!<%9%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/mail/mutt/Makefile                                            1.110
ports/mail/mutt/files/patch-rfc822.c                                  1.1
ports/mail/mutt-devel/Makefile                                      1.141
ports/mail/mutt-devel/files/patch-rfc822-security                     1.1
- -------------------------------------------------------------------------


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

<URL:http://www.mutt.org/announce/mutt-1.2.5.1-1.3.25.html>


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:04,v 1.4 2002/01/05 13:17:54 hrs Exp $

----Next_Part(Sat_Jan__5_22:18:45_2002_031)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Disposition: inline; filename="02:05"
Content-Transfer-Encoding: 7bit


FreeBSD $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG(B
=============================================================================
FreeBSD-SA-02:05 (2002-01-04)
 * pine port insecure URL handling
=============================================================================

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

  Subject: ANNOUNCE: FreeBSD Ports Security Advisory FreeBSD-SA-02:05.pine
  From: FreeBSD Security Advisories <security-advisories@FreeBSD.ORG>
  Date: Fri, 4 Jan 2002 17:04:50 -0800 (PST)
  Message-Id: <200201050104.g0514oq93202@freefall.freebsd.org>
  X-Sequence: announce-jp 888

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

$B%H%T%C%/(B:       pine $B$N(B port $B$K4^$^$l$k0BA4$G$J$$(B URL $B=hM}$NLdBj(B
	        (pine port insecure URL handling)
$BJ,N`(B:		ports
$B%b%8%e!<%k(B:	pine
$B9pCNF|(B:		2002-01-04
$B%/%l%8%C%H(B:	zen-parse <zen-parse@gmx.net>
$B1F6AHO0O(B:	$B=$@5F|0JA0$N(B Ports Collection
$B=$@5F|(B:		2001-10-05 08:41:39 UTC
FreeBSD $B$K8GM-$+(B:	NO


I.   $BGX7J(B - Background

PINE is an application for reading mail and news.

PINE $B$O%a!<%k$H%K%e!<%9$rFI$`$?$a$N%"%W%j%1!<%7%g%s$N(B 1 $B$D$G$9(B.


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

The pine port, versions previous to pine-4.40, handles URLs in
messages insecurely.  PINE allows users to launch a web browser to
visit a URL embedded in a message.  Due to a programming error, PINE
does not properly escape meta-characters in the URL before passing it
to the command shell as an argument to the web browser.

pine $B$N(B port $B$N(B pine-4.40 $B$h$jA0$N%P!<%8%g%s$K$O(B, $B%a%C%;!<%8$K4^$^$l$k(B
URL $B$rE,@Z$K=hM}$7$^$;$s(B.  PINE $B$O%a%C%;!<%8$KKd$a9~$^$l$?(B URL $B$K(B
$B%"%/%;%9$9$k$?$a$K%&%'%V%V%i%&%6$r<+F0E*$K5/F0$5$;$k5!G=$,$"$j$^$9$,(B,
$B%&%'%V%V%i%&%6$r5/F0$9$k$?$a$N%3%^%s%I%7%'%k0z?t$K(B, $B$=$N(B URL $BCf$N(B
$B%a%?%-%c%i%/%?$r%(%9%1!<%W$;$:$KEO$7$F$7$^$C$F$$$^$9(B.  $B$3$l$O%W%m%0%i%`$N(B
$B%P%0$,860x$G$9(B.

The pine 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 6000 third-party applications in a ready-to-install format. The
ports collection shipped with FreeBSD 4.4 contains this problem since
it was discovered after the release.

pine $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 6000 $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$3$NLdBj$O(B FreeBSD 4.4 $B$N%j%j!<%98e$KH/8+!&=$@5$5$l$?$?$a(B,
FreeBSD 4.4 $B$K$O$3$NLdBj$K$h$k%;%-%e%j%F%#>e$N<eE@$,4^$^$l$F$$$^$9(B.

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.

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

An attacker can supply commands enclosed in single quotes ('') in a
URL embedded in a message sent to the victim.  If the user then
decides to view the URL, PINE will launch a command shell which will
then execute the attacker's commands with the victim's privileges.  It
is possible to obfuscate the URL so that it will not necessarily seem
dangerous to the victim.

$B967b<T$O(B, $B%7%s%0%k%/%)!<%H(B ('') $B$G$/$/$i$l$?%3%^%s%I$r;E9~$s$@(B
URL $B$r%a%C%;!<%8$KKd$a9~$s$G967bBP>]$KAw$k$3$H$,$G$-$^$9(B.
$B967bBP>]$H$J$C$?%f!<%6$,$=$N(B URL $B$r1\Mw$7$h$&$H$7$?;~(B, PINE $B$O(B
$B%3%^%s%I%i%$%s%7%'%k$r5/F0$7$F(B, $B967b<T$N0U?^$7$?%3%^%s%I$r(B
$B$=$N%f!<%6$N8"8B$G<B9T$7$F$7$^$$$^$9(B.  $B$^$?(B, $B$=$N(B URL $B$O(B
$B4m81$G$"$k$3$H$r967bBP>]$K8g$i$l$J$$$h$&$KAu$&$3$H$,2DG=$G$9(B.


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

1) Deinstall the pine port/package if you have it installed.
1) pine $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$^$9(B.


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

1) Upgrade your entire ports collection and rebuild the port.
1) Ports Collection $BA4BN$r%"%C%W%0%l!<%I$7(B pine $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: pine $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/mail/pine-4.43.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/mail/pine-4.43.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.

3) Download a new port skeleton for the pine port from:
3) pine $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/devel/portcheckout-2.0.tgz
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/devel/portcheckout-2.0.tgz


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

The following list contains the $FreeBSD$ revision numbers of each
file that was corrected in the FreeBSD source
$B<!$NI=$O(B, $B:#2s=$@5$5$l$?(B FreeBSD $B$N%=!<%9%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/mail/pine4/Makefile                                            1.58
ports/mail/pine4/distinfo                                            1.18
ports/mail/pine4/files/patch-aa                                       1.4
ports/mail/pine4/files/patch-ac                                      1.11
ports/mail/pine4/files/patch-af                                      1.12
ports/mail/pine4/files/patch-ai                                      1.11
ports/mail/pine4/files/patch-aj                                       1.5
ports/mail/pine4/files/patch-ak                                       1.6
ports/mail/pine4/files/patch-al                                      1.10
ports/mail/pine4/files/patch-am                                       1.6
ports/mail/pine4/files/patch-an                                       1.5
ports/mail/pine4/files/patch-ap                                       1.3
ports/mail/pine4/files/patch-at                                       1.6
ports/mail/pine4/files/patch-au                                       1.4
ports/mail/pine4/files/patch-ax                                       1.4
ports/mail/pine4/files/patch-az                                       1.3
ports/mail/pine4/files/patch-be                                       1.1
ports/mail/pine4/files/patch-bf                                       1.1
ports/mail/pine4/files/patch-bg                                       1.1
ports/mail/pine4/files/patch-reply.c                                  1.2
- -------------------------------------------------------------------------


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:05,v 1.4 2002/01/05 13:17:54 hrs Exp $

----Next_Part(Sat_Jan__5_22:18:45_2002_031)----
