============================================================================= FreeBSD-SA-02:06 Security Advisory FreeBSD, Inc. トピック: sudo の port におけるローカルユーザの権限昇格問題 (sudo port may enable local privilege escalation) カテゴリ: ports モジュール: sudo 告知日: 2002-01-16 クレジット: Sebastian Krahmer 影響範囲: 修正日より前の Ports collection 修正日時: 2002-01-15 02:56:33 UTC FreeBSD 固有: NO I. 背景 - Background Sudo is a program designed to allow a sysadmin to give limited root privileges to users and log root activity. sudo は、システム管理者が一般ユーザに root 権限を与えるために使用する プログラムです。与える権限に制限を設けたり、root 権限で行われた操作を 記録したりすることが可能です。 II. 問題の詳細 - Problem Description The sudo port, versions prior to sudo-1.6.4.1, contains a vulnerability that may allow a local user to obtain superuser privileges. sudo-1.6.4.1 より前の port には、ローカルユーザがスーパー ユーザ権限を奪取可能な脆弱性があります。 If a user who has not been authorized by the system administrator (listed in the `sudoers' file) attempts to use sudo, sudo will send an email alert. When it does so, it invokes the system mailer with superuser privileges, and with most of the user's environment intact. システム管理者に許可を受けていないユーザ(`sudoers' ファイルに定義 されていないユーザ)が sudo を使用すると、sudo はメールで警告を発し ます。そのとき、sudo を実行したユーザの環境変数をほぼそのまま受け 継いだ状態で、システムのメーラがスーパーユーザ権限で実行されて しまいます。 The sudo 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. sudo の port はデフォルトではインストールされていませんし、"FreeBSD の一部" でもありません。それは 6000 以上のサードパーティ製アプリケー ションをすぐにインストールできる形式で収録した FreeBSD ports collection の一部です。FreeBSD 4.4 のリリース後にこの問題が発見されたため、4.4 と共にリリースされた port collection に含まれている sudo の port には この問題があります。 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 は、このようなサードパーティ製アプリケーションのセキュリティに ついて、何か主張するということはありません。しかし、システムのセキュリティ に大きな影響を与える ports に関しては、セキュリティ監査を提供するように 努力を続けています。 III. 影響範囲 - Impact If the system mailer's behavior can be influenced by the settings of environmental variables, then an attacker may obtain superuser privileges. There is at least one mailer (postfix) that can be influenced in this fashion. 環境変数の内容によって、システムのメーラの動作が影響を受ける場合、 攻撃者がスーパーユーザ権限を奪取できる可能性があります。少なくとも、 postfix はこの脆弱性の影響を受けます。 IV. 回避方法 - Workaround 1) Deinstall the sudo port/package if you have it installed. 1) sudo の port や package をインストールしている場合は、これを 削除します。 V. 解決法 - Solution 1) Upgrade your entire ports collection and rebuild the port. 1) ports collection 全体をアップグレードし、sudo の port を リビルドします。 2) Deinstall the old package and install a new package dated after the correction date, obtained from the following directories: 2) 古い package を削除し、以下の場所から入手した修正日以降の新しい package をインストールします。 [i386] ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/security/sudo-1.6.4.1.tgz ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/security/sudo-1.6.4.1.tgz [alpha] Packages are not automatically generated for the alpha architecture at this time due to lack of build resources. package をビルドするためのリソースが不足しているため、現時点では alpha アーキテクチャ用の package の自動生成は行っていません。 NOTE: It may be several days before updated packages are available. 注意: アップデート済みの package が利用できるようになるまで、何日か かかるかもしれません。 3) Download a new port skeleton for the sudo port from: 3) 以下から sudo の port 用の新しい port スケルトンを ダウンロードします: http://www.freebsd.org/ports/ and use it to rebuild the port. そして、これを使って 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) 上記の選択肢 (3) の作業を自動化するため、portcheckout ユーティリティを 使用します。portcheckout の port は /usr/ports/devel/portcheckout で利用 できるほか、以下の場所から package を入手することもできます: 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. 修正の詳細 - Correction details The following list contains the revision numbers of each file that was corrected in the FreeBSD ports collection. 以下のリストは、FreeBSD ports collection の中で修正されたファイルの リビジョン番号を示しています。 Path Revision - ------------------------------------------------------------------------- ports/security/sudo/Makefile 1.43 ports/security/sudo/distinfo 1.26 - -------------------------------------------------------------------------