From owner-doc-jp-work@jp.FreeBSD.org Tue May 21 02:09:58 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g4KH9wH88998;
	Tue, 21 May 2002 02:09:58 +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 g4KH9wv88993
	for <doc-jp-work@jp.FreeBSD.org>; Tue, 21 May 2002 02:09:58 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Received: from mail.allbsd.org (p17121-adsao04hon-acca.tokyo.ocn.ne.jp [61.199.22.121])
	by eos.ocn.ne.jp (OCN) with ESMTP id CAA15953
	for <doc-jp-work@jp.FreeBSD.org>; Tue, 21 May 2002 02:09:58 +0900 (JST)
Received: from localhost (alph.allbsd.org [192.168.0.10])
	by mail.allbsd.org (8.12.3/3.7W/DomainMaster) with ESMTP id g4KH9ocu012781
	for <doc-jp-work@jp.FreeBSD.org>; Tue, 21 May 2002 02:09:51 +0900 (JST)
	(envelope-from hrs@eos.ocn.ne.jp)
Date: Tue, 21 May 2002 02:08:26 +0900 (JST)
Message-Id: <20020521.020826.41633083.hrs@eos.ocn.ne.jp>
To: doc-jp-work@jp.FreeBSD.org
From: Hiroki Sato <hrs@eos.ocn.ne.jp>
In-Reply-To: <200205201608.g4KG82m23915@freefall.freebsd.org>
References: <200205201608.g4KG82m23915@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(Tue_May_21_02:08:26_2002_646)--"
Content-Transfer-Encoding: 7bit
Reply-To: doc-jp-work@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020417
X-Sequence: doc-jp-work 365
Subject: [doc-jp-work 365] Re: FreeBSD Security Advisory FreeBSD-SA-02:24.k5su
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(Tue_May_21_02:08:26_2002_646)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

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

 $B$H$j$"$($:(B 1 $B8DL\!#(B

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

----Next_Part(Tue_May_21_02:08:26_2002_646)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Disposition: inline; filename="02:24"
Content-Transfer-Encoding: 7bit


FreeBSD $B%;%-%e%j%F%#4+9p(B $BF|K\8lHG(B
=============================================================================
FreeBSD-SA-02:24.k5su (2002-05-20)
 * k5su utility does not honor `wheel' group
=============================================================================

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

  Subject: ANNOUNCE: FreeBSD Security Advisory FreeBSD-SA-02:24.k5su
  From: FreeBSD Security Advisories <security-advisories@FreeBSD.ORG>
  Date: Mon, 20 May 2002 09:08:06 -0700 (PDT)
  Message-Id: <200205201608.g4KG86X23936@freefall.freebsd.org>
  X-Sequence: announce-jp xxx

 $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~$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!"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:24.k5su                                       Security Advisory
                                                          The FreeBSD Project

$B%H%T%C%/(B:	k5su $B%f!<%F%#%j%F%#$,(B `wheel' $B%0%k!<%W$rG'<1$7$J$$LdBj(B
                (k5su utility does not honor `wheel' group)

$BJ,N`(B:		kerberos5
$B%b%8%e!<%k(B:	kerberos5/usr.bin/k5su
$B9pCNF|(B:		2002-05-20
$B%/%l%8%C%H(B:	jmallet@FreeBSD.org
$B1F6AHO0O(B:	FreeBSD 4.4-RELEASE
                FreeBSD 4.5-RELEASE
                $B=$@5F|$h$jA0$N(B FreeBSD-STABLE
$B=$@5F|(B:		2002-05-15 12:51:30 UTC (RELENG_4)
                2002-05-15 12:56:21 UTC (RELENG_4_5)
                2002-05-15 13:04:00 UTC (RELENG_4_4)
FreeBSD $B$K8GM-$+(B:	YES


I.   $BGX7J(B - Background

The k5su utility is a SU utility similar to su(1), and is used to
switch privileges after authentication using Kerberos 5 or the local
passwd(5) file.  k5su is installed as part of the `krb5' distribution,
or when building from source with MAKE_KERBEROS5 set.  Neither of
these are default settings.

k5su $B%f!<%F%#%j%F%#$O(B su(1) $B$K;w$?(B SU $B%f!<%F%#%j%F%#$N0l$D$G!"(BKerberos 5 $B$d(B
$B%m!<%+%k$N(B passwd(5) $B$K$h$kG'>Z8e$K%f!<%68"8B$r@Z$jBX$($k$?$a$K;H$o$l$^$9!#(B
k5su $B$O(B `krb5' $BG[I[J*$N0lIt$H$7$F!"$b$7$/$O(B MAKE_KERBEROS5 $BJQ?t$r(B
$B@_Dj$7$F%=!<%9$+$i%7%9%F%`$r9=C[$7$?>l9g$K%$%s%9%H!<%k$5$l$^$9!#(B
$B$?$@$7!"$3$l$i$O$$$:$l$bI8=`$G$O$"$j$^$;$s(B ($BLuCm(B: $BI8=`$G$O(B krb5 $BG[I[J*$O(B
$B%$%s%9%H!<%k$5$l$:!"(BMAKE_KERBEROS5 $B$b@_Dj$5$l$F$$$^$;$s(B)$B!#(B


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

Historically, the BSD SU utility only allows users who are members
of group `wheel' (group-ID 0) to obtain superuser
privileges.  The k5su utility, however, does not honor this convention
and does not verify group membership if a user has successfully
authenticated.

BSD SU $B%f!<%F%#%j%F%#$G$OEAE}E*$K!"%9!<%Q%f!<%68"8B$,3MF@$G$-$k%f!<%6$r(B
`wheel' $B%0%k!<%W(B ($B%0%k!<%W(B ID 0) $B$N%f!<%6$K@)8B$7$F$$$^$9!#(B
$B$7$+$7(B k5su $B%f!<%F%#%j%F%#$O$3$N47=,$rL5;k$7$F$*$j!"%f!<%6$,(B
$B@5>o$KG'>Z$5$l$F$$$l$P=jB0%0%k!<%W$N%A%'%C%/$r9T$J$$$^$;$s!#(B

k5su also lacks other features of su(1), such as checking for
password expiration, implementing login classes, and checking
for the target user's login shell in /etc/shells.

$B$^$?!"(Bk5su $B$K$O(B su(1) $B$N;}$D5!G=$N$&$A!"%Q%9%o!<%IM-8z4|8B$N%A%'%C%/!"(B
$B%m%0%$%s%/%i%9$N<BAu!"%f!<%6$N%m%0%$%s%7%'%k$,(B /etc/shells $B$K(B
$B4^$^$l$F$$$k$+$I$&$+$N%A%'%C%/$H$$$C$?5!G=$,$"$j$^$;$s!#(B


III. $B1F6AHO0O(B - Impact

Contrary to the expectations of many BSD system administrators, users
not in group `wheel' may use k5su to attempt to obtain superuser
privileges.  Note that this would require knowledge of the root
account password, or an explicit entry in the Kerberos 5 `.k5login'
ACL for the root account.

$B$3$l$OB?$/$N(B BSD $B%7%9%F%`4IM}<T$NM=A[$KH?$9$k$3$H$G$9$,!"(B
`wheel' $B%0%k!<%W$K=jB0$7$J$$%f!<%6$O!"(B
k5su $B$r;H$C$F%9!<%Q%f!<%68"8B$rF@$h$&$H;n$_$k$3$H$,2DG=$G$9!#(B
$B$?$@$78"8B$r<B:]$K3MF@$9$k$K$O(B root $B%f!<%6%"%+%&%s%H$N%Q%9%o!<%I$r(B
$BCN$C$F$$$k$+!"(Broot $B%f!<%6%"%+%&%s%HMQ$N(B Kerberos 5 `.k5login'
$B%"%/%;%9@)8f%j%9%H$K!"L@<(E*$K%(%s%H%j$,=q$+$l$F$$$kI,MW$,$"$j$^$9!#(B


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

Remove the set-user-ID bit from the k5su utility:
k5su $B%f!<%F%#%j%F%#$N(B set-user-ID $B%S%C%H$r:o=|$7$F$/$@$5$$!#(B

# chmod u-s /usr/bin/k5su

This will completely disable k5su.
$B$3$l$K$h$j!"(Bk5su $B$O40A4$KL58z2=$5$l$^$9!#(B

Sites which wish to use Kerberos 5 authentication for SU and are
comfortable with its limitations may choose to leave the set-user-ID
bit enabled.  As of the correction date, FreeBSD (including the
upcoming 4.6-RELEASE) will install k5su if requested, but the
set-user-ID bit will not be enabled by default.  See also the
ENABLE_SUID_K5SU option in make.conf(5).

$B>e5-$N$h$&$J(B SU $B%f!<%F%#%j%F%#$N@)8B$,5vMF$G$-!"(BSU $B%f!<%F%#%j%F%#$K(B
Kerberos 5 $BG'>Z$r;H$$$?$$$H$$$&%5%$%H$G$O!"(Bset-user-ID $B%S%C%H$r(B
$B$=$N$^$^$K$7$F$bNI$$$G$7$g$&!#=$@5F|0J9_$N(B FreeBSD ($B%j%j!<%9$,(B
$BM=Dj$5$l$F$$$k(B 4.6-RELEASE $B$r4^$`(B) $B$G(B k5su $B$N%$%s%9%H!<%k$r(B
$B9T$J$C$?>l9g!"I8=`$G$O(B set-user-ID $B%S%C%H$,M-8z$K$J$j$^$;$s!#(B
make.conf(5) $B$N(B ENABLE_SUID_K5SU $B%*%W%7%g%s$b;2>H$7$F$_$F$/$@$5$$!#(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
$B%Q%9L>(B                                                          $B%j%S%8%g%s(B
  $B%V%i%s%A(B
- -------------------------------------------------------------------------
src/UPDATING
  RELENG_4                                                      1.73.2.67
  RELENG_4_5                                               1.73.2.50.2.12
  RELENG_4_4                                               1.73.2.43.2.12
src/etc/defaults/make.conf
  RELENG_4                                                      1.97.2.65
  RELENG_4_5                                                1.97.2.59.2.1
  RELENG_4_4                                                1.97.2.58.2.1
src/kerberos5/usr.bin/k5su/Makefile
  RELENG_4                                                      1.73.2.67
  RELENG_4_5                                                1.97.2.59.2.1
  RELENG_4_4                                                  1.1.2.2.2.1
src/share/man/man5/make.conf.5
  RELENG_4                                                      1.12.2.16
  RELENG_4_5                                                1.12.2.12.2.1
  RELENG_4_4                                                1.12.2.10.2.1
- -------------------------------------------------------------------------


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$?$@$7K]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(B, $BF|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: announce-jp/FreeBSD-SA/02:24,v 1.1 2002/05/20 17:06:51 hrs Exp $

----Next_Part(Tue_May_21_02:08:26_2002_646)----
