FreeBSD セキュリティ勧告 日本語版 ============================================================================= FreeBSD-SA-01:57 (2001-09-06) * sendmail contains local root vulnerability [REVISED] ============================================================================= このメールは, announce-jp に流れた Subject: ANNOUNCE: FreeBSD Security Advisory FreeBSD-SA-01:57.sendmail [REVISED] From: FreeBSD Security Advisories Date: Thu, 6 Sep 2001 14:18:21 -0700 (PDT) Message-Id: <200109062118.f86LILD76097@freefall.freebsd.org> X-Sequence: announce-jp 823 を日本語訳したものです. 原文は PGP 署名されていますが, この日本語訳は PGP 署名されていません. 修正パッチ等の内容が改ざんされていないことを確認するために PGP 署名の チェックを行なうには, 原文を参照してください. 日本語訳および, ミラーサイト利用の詳細については, 文末の「A. FreeBSD セキュリティ勧告 日本語版について」をご覧ください. [翻訳者: 佐藤 広生 ] --(ここから) ============================================================================= FreeBSD-SA-01:57 Security Advisory FreeBSD, Inc. トピック: sendmail を利用したローカルにおける root 権限の不正使用問題 (sendmail contains local root vulnerability [REVISED]) 分類: core モジュール: sendmail 告知日: 2001-08-27 改訂日: 2001-09-06 クレジット: Cade Cairnss 影響範囲: 2000 年 8 月 27 日以降, 修正日以前の FreeBSD 4-STABLE FreeBSD 4.1.1-RELEASE, 4.2-RELEASE, 4.3-RELEASE 修正日: 2001-08-21 01:36:37 UTC (FreeBSD 4.3-STABLE) 2001-08-22 05:34:11 UTC (RELENG_4_3) FreeBSD に固有か: NO 0. 改訂履歴 - Revision History v1.0 2001-08-27 初版公開 v1.1 2001-08-30 setuid ビットを削除するようにパッケージを修正. openssl を含まない場合のパッケージを追加. パッケージの導入方法にあった誤記を修正. RELENG_4_3 では $Id$ が更新されていないことの注記を追加. Update package to remove setuid bit from saved file; add non-openssl package; correct typo in package instructions; note that $Id$ not updated in RELENG_4_3. v1.2 2001-09-06 sendmail-crypt アップグレードパッケージが作成する sendmail バイナリのバックアップコピーの許可属性が 正しくなかった点の修正およびパッケージの更新. セキュリティ勧告自体は変更なし. No changes to advisory, but the sendmail-crypto upgrade package had incorrect permissions for the sendmail binary. Update this package. I. 背景 - Background sendmail is a mail transfer agent. sendmail は電子メール配送エージェント (MTA) の一つです. II. 問題の詳細 - Problem Description Sendmail contains an input validation error which may lead to the execution of arbitrary code with elevated privileges by local users. Due to the improper use of signed integers in code responsible for the processing of debugging arguments, a local user may be able to supply the signed integer equivalent of a negative value supplied to sendmail's "trace vector". This may allow a local user to write data anywhere within a certain range of locations in process memory. Because the '-d' command-line switch is processed before the program drops its elevated privileges, the attacker may be able to cause arbitrary code to be executed with root privileges. sendmail の引数チェック部分には誤りが含まれており, ローカルユーザが 高い権限で任意のコードを実行しすることができる危険性があります. デバッグ用の引数を処理するコードに誤って符号つき整数 (signed integer) 型の 変数が使われているため, ローカルユーザは sendmail の "trace vector" に負の値を指定することが可能です. これにより ローカルユーザは, そのプロセスの持つメモリ空間の特定範囲であれば, 自由にデータを書き込むことが可能になります. '-d' コマンドラインオプションはプログラムが高い権限を無効化する前に 処理されるため, 攻撃者は root 権限で任意のコードを実行できる可能性が あることになります. III. 影響範囲 - Impact Local users may be able to execute arbitrary code with root privileges. ローカルユーザは root 権限で任意のコードを不正に 実行できる可能性があります. IV. 回避方法 - Workaround Do not allow untrusted users to execute the sendmail binary. 信頼できないユーザが sendmail バイナリを実行できないように してください. V. 解決策 - Solution 次のいずれかに従ってください. 1) Upgrade your vulnerable FreeBSD system to 4.3-STABLE or the RELENG_4_3 security branch after the respective correction dates. 1) 弱点を持った FreeBSD システムを修正日以降の FreeBSD 4.3-STABLE もしくは RELENG_4_3 セキュリティブランチにアップグレードする. 2) FreeBSD 4.x systems after August 27, 2000 and prior to the correction date: 2) 2000 年 8 月 27 日以降, 修正日以前の FreeBSD 4.x システムの場合: The following patch has been verified to apply to FreeBSD 4.1.1-RELEASE, 4.2-RELEASE, 4.3-RELEASE and 4-STABLE dated prior to the correction date. 以下の修正パッチは, FreeBSD 4.2-RELEASE, 4.3-RELEASE および, 修正日以前の FreeBSD 4-STABLE に対して適用可能なことが確認されているものです. Download the patch and the detached PGP signature from the following locations, and verify the signature using your PGP utility. 次の場所から修正パッチをダウンロードし, PGP ユーティリティを使って PGP 署名を確認してください. # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:57/sendmail.patch # fetch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:57/sendmail.patch.asc Execute the following commands as root: そして root 権限で次のコマンドを実行します. # cd /usr/src # patch -p < /path/to/patch # cd /usr/src/lib/libsmutil # make depend && make all # cd /usr/src/usr.sbin/sendmail # make depend && make all install 3) FreeBSD 4.3-RELEASE システムの場合: ** NOTE: The initial version of the upgrade package did not remove ** setuid root privileges from the saved copy of the sendmail binary. ** To correct this, deinstall the old package using the pkg_delete(1) ** command and install the corrected package as described below. ** 注意: 最初のバージョンのアップグレードパッケージでは, ** sendmail バイナリのバックアップコピー作成を, root で setuid されたまま ** 行なっていました. これを修正するには, 古いパッケージを ** pkg_delete(1) コマンドで削除し, 以下の手順に従って ** 修正されたパッケージをインストールしてください. An experimental upgrade package is available for users who wish to provide testing and feedback on the binary upgrade process. This package may be installed on FreeBSD 4.3-RELEASE systems only, and is intended for use on systems for which source patching is not practical or convenient. 実験的なものですが, アップグレードパッケージが用意されています. これはバイナリアップグレード機能の試験および, それに対する意見を 提供していただけるユーザ向けのものです. このパッケージは FreeBSD 4.3-RELEASE システムにのみインストール可能で, ソースへ 修正パッチを適用することが現実的でなかったり, そうすることが ふさわしくないと考えられるシステムでの利用を考慮したものです. If you use the upgrade package, feedback (positive or negative) to security-officer@FreeBSD.org is requested so we can improve the process for future advisories. このアップグレードパッケージを利用する場合は, 将来のセキュリティ勧告を より良いものにするため, (肯定的・否定的のいずれであっても) security-officer@FreeBSD.org までご意見をお寄せください. During the installation procedure, backup copies are made of the files which are replaced by the package. These backup copies will be reinstalled if the package is removed, reverting the system to a pre-patched state. インストール処理の途中で, アップグレードパッケージは 置き換えるファイルのバックアップコピーを作成します. アップグレードパッケージが削除された時, このバックアップコピーは 再インストールされてシステムは修正パッチを適用する前の状態に戻ります. Two versions of the package are available, depending on whether or not OpenSSL is installed. If the file /usr/lib/libcrypto.so exists on the local system, follow the directions in section 1a) below, otherwise follow the directions in section 1b). After adding the package, proceed with the instructions in section 2). パッケージには, OpenSSL がインストールされているシステム用と そうでないシステム用の 2 種類が用意されています. ローカルシステムに /usr/lib/libcrypto.so というファイルが存在する場合は 1a) 節の 手順に, 存在しない場合は 1b) 節の手順に従い, パッケージのインストールが終わったら 2) 節に進んでください. 1a) If crypto is installed: 1a) crypto がインストールされている場合: # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-crypto-01.57.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-crypto-01.57.tgz.asc PGP ユーティリティを使って PGP 署名を確認します. # pkg_add security-patch-sendmail-crypto-01.57.tgz 1b) If crypto is not installed: 1b) crypto がインストールされていない場合: # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-nocrypto-01.57.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:57/security-patch-sendmail-nocrypto-01.57.tgz.asc PGP ユーティリティを使って PGP 署名を確認します. # pkg_add security-patch-sendmail-nocrypto-01.57.tgz 2) Restart sendmail after applying the patch by executing the following commands as root: 2) 修正パッチの適用後, root 権限で以下のコマンドを実行して sendmail を再起動します. # killall sendmail # /usr/sbin/sendmail -bd -q30m The flags to sendmail may need to be adjusted as required for the local system configuration. sendmail のオプションは, ローカルのシステム構成に合わせて 適切なものに変更してください. VI. 修正の詳細 - Correction details The following is the sendmail $Id$ revision number of the file that was corrected for the supported branches of FreeBSD. The $Id$ revision number of the installed source can be examined using the ident(1) command. Note that the $Id$ tag was not updated on the RELENG_4_3 branch because a newer vendor release of sendmail was not imported, instead only this vulnerability was patched. 次に示すのは, 保守されている FreeBSD ブランチにおける sendmail の, 修正されたファイルに含まれる $Id$ リビジョン番号です. インストール済みのソースファイルの $Id$ リビジョン番号は ident(1) コマンドを使うことで確認できます. ただし RELENG_4_3 ブランチの $Id$ タグは更新されていません. これはベンダによる新しいリリースの import ではなく, セキュリティ上の修正だけを加えているためです. Revision Path 8.20.22.4 src/contrib/sendmail/src/trace.c リビジョン番号 パス名 8.20.22.4 src/contrib/sendmail/src/trace.c VII. 参考資料 - References A. FreeBSD セキュリティ勧告 日本語版について 日本語訳は FreeBSD 日本語ドキュメンテーションプロジェクト (doc-jp) が 参考のために提供するものです. 過去の日本語版セキュリティ勧告は http://www.FreeBSD.org/ja/security/ にまとめられています. ただし, 翻訳者および doc-jp は, その内容についていかなる保証も いたしませんのでご注意ください. 日本語訳についてのご意見, ご要望, お問い合わせ等は doc-jp@jp.FreeBSD.org までお願いします. この勧告の中で紹介されている WWW サイト http://www.FreeBSD.org/ および FTP サイト ftp://ftp.FreeBSD.org/ には, 日本のミラーサイトが存在します. ネットワークの混雑を緩和するため, まずはミラーサイトの利用を 考慮するようお願いします. 日本のミラーサイトを利用するには, http://www.FreeBSD.org/ を http://www.jp.FreeBSD.org/www.freebsd.org/ に, ftp://ftp.FreeBSD.org/ を ftp://ftp.jp.FreeBSD.org/ に, それぞれ置き換えてください. 他の地域を含む, ミラーサイトに関する詳細は, http://www.FreeBSD.org/handbook/mirror.html (英文) http://www.FreeBSD.org/ja/handbook/mirror.html (日本語訳) にまとめられています. $hrs: announce-jp/FreeBSD-SA/01:57,v 1.6 2001/09/24 19:07:01 hrs Exp $