FreeBSD セキュリティ勧告 日本語版 ============================================================================= FreeBSD-SA-01:54 (2001-08-20) * telnetd contains remote buffer overflow ============================================================================= このメールは, announce-jp に流れた Subject: ANNOUNCE: FreeBSD Ports Security Advisory FreeBSD-SA-01:54.ports-telnetd From: FreeBSD Security Advisories Date: Mon, 20 Aug 2001 14:55:57 -0700 (PDT) Message-Id: <200108202155.f7KLtvK62776@freefall.freebsd.org> X-Sequence: announce-jp 803 を日本語訳したものです. 原文は PGP 署名されていますが, この日本語訳は PGP 署名されていません. 修正パッチ等の内容が改ざんされていないことを確認するために PGP 署名の チェックを行なうには, 原文を参照してください. 日本語訳および, ミラーサイト利用の詳細については, 文末の「A. FreeBSD セキュリティ勧告 日本語版について」をご覧ください. [翻訳者: 佐藤 広生 ] --(ここから) ============================================================================= FreeBSD-SA-01:54 Security Advisory FreeBSD, Inc. トピック: telnetd におけるリモートからのバッファオーバフロー問題 (telnetd contains remote buffer overflow) 分類: ports モジュール: krb5/heimdal/SSLtelnet 告知日: 2001-08-20 クレジット: Sebastian 影響範囲: 修正日以前の Ports Collection 修正日: 2001-07-19 21:43:41 UTC (heimdal) 2001-07-24 15:29:39 UTC (krb5) SSLtelnet port は未修正 FreeBSD に固有か: NO I. 背景 - Background telnetd is the server for the telnet remote virtual terminal protocol. telnetd は, telnet リモート仮想端末プロトコル用のサーバプログラムです. II. 問題の詳細 - Problem Description This advisory is closely related to the previously released FreeBSD-SA-01:49.telnetd.v1.1 advisory. That advisory pertains to the telnetd included in the base FreeBSD system. This advisory pertains to optional third-party telnetd implementations found in the FreeBSD ports collection. このセキュリティ勧告は, 先に公開された FreeBSD-SA-01:49.telnetd.v1.1 と 密接な関係があります. 前回の勧告は FreeBSD ベースシステムに含まれる telnetd に関するものでしたが, 今回は FreeBSD Ports Collection に 含まれているサードパーティ製の telnetd 実装に関するものとなっています. An overflowable buffer was found in the versions of telnetd included with several ports. These ports include: 以下の port に含まれる telnetd には, バッファオーバフロー問題が 存在することが判明しています. MIT Kerberos V (security/krb5) prior to version 1.2.2_2 Heimdal (security/heimdal) prior to version 0.4b_1 SSLtelnet (net/SSLtelnet) - this port is not yet fixed; see below. バージョン 1.2.2_2 より前の MIT Kerberos V (security/krb5) バージョン 0.4b_1 より前の Heimdal (security/heimdal) SSLtelnet (net/SSLtelnet) - この port は未修正です. 以下をご覧ください. Due to incorrect bounds checking of data buffered for output to the remote client, an attacker can cause the telnetd process to overflow the buffer and crash, or execute arbitrary code as the user running telnetd, usually root. A valid user account and password is not required to exploit this vulnerability, only the ability to connect to a telnetd server. リモートクライアントへの出力データ用バッファの境界チェックが 不十分なため, 攻撃者はそれを悪用して telnetd プロセスに バッファオーバフローを発生させてクラッシュさせたり, あるいは telnetd を実行しているユーザ (通常 root) の権限で 任意のコードを不正に実行することが可能です. このセキュリティ上の弱点は telnetd サーバへのアクセスが可能であれば悪用可能であり, 有効な ユーザアカウントやパスワードを必要としません. These ports are not installed by default, nor are they "part of FreeBSD" as such: they are part of the FreeBSD ports collection, which contains over 5600 third-party applications in a ready-to-install format. The ports collection shipped with FreeBSD 4.3 is vulnerable to this problem since it was discovered after its release, but the problems with the krb5 and heimdal ports were corrected prior to the (forthcoming) release of FreeBSD 4.4. これらの port はデフォルトでインストールされるものではなく, 「FreeBSD システムの一部」を構成するものでもありません. それらは 5600 を越えるサードパーティ製アプリケーションがすぐに インストールできる形で収められている FreeBSD Ports Collection の一部です. リリース後に問題が見つかったため FreeBSD 4.3 とともに 出荷された Ports Collection はこの問題を含んでいますが, krb5, heimdal の port は公開予定の FreeBSD 4.4 のリリース前に修正されました. The SSLtelnet vulnerability has not yet been corrected: due to divergences in the code, it is more difficult to correct the vulnerability in that port. This advisory will be reissued once the vulnerability is corrected. コード規模が大きく弱点の修正が困難なため, SSLtelnet の port に含まれる セキュリティ上の弱点はまだ修正されていません. そのため, このセキュリティ勧告は, 弱点が修正され次第再発行される予定です. III. 影響範囲 - Impact Remote users can cause arbitrary code to be executed as the user running telnetd, usually root. リモートユーザは telnetd を実行しているユーザ (通常 root) の権限で 任意のコードを不正に実行することが可能です. IV. 回避方法 - Workaround [訳注] 次のいずれかに従ってください. 1) Disable the telnet service, which is usually run out of inetd: comment out lines in /etc/inetd.conf that begin with the word `telnet', if present, e.g. 1) inetd から実行される telnet サービスを無効にします. /etc/inetd.conf に, たとえば次のような `telnet' で始まる行が 存在する場合は, その行をコメントアウトしてください. telnet stream tcp nowait root /usr/local/libexec/telnetd telnetd telnet stream tcp6 nowait root /usr/local/libexec/telnetd telnetd and execute the following command as root: そして次のコマンドを root 権限で実行します. # kill -HUP `cat /var/run/inetd.pid` 2) Impose access restrictions using TCP wrappers (/etc/hosts.allow), or a network-level packet filter such as ipfw(8) or ipf(8) on the perimeter firewall or the local machine, to limit access to the telnet service to trusted machines. 2) ファイアウォールあるいはローカルマシン上で TCP wrappers (/etc/hosts.allow) もしくは ipfw(8) や ipf(8) といったネットワークレベルのパケットフィルタを 用いてアクセス制限を行ない, telnet サービスを信頼できるとみなせるマシンに 限定して提供します. 3) Deinstall the affected ports/packages if they are installed. 3) 弱点を持つ ports/packages がインストールされている場合は, それらを削除します. V. 解決策 - Solution The updated ports include fixes for this vulnerability: krb5-1.2.2_2 and later heimdal-0.4b_1 and later この弱点が修正された新しい port は以下のとおりです. krb5-1.2.2_2 および, それより新しいバージョンの krb5 heimdal-0.4b_1 および, それより新しいバージョン heimdal 1) Upgrade your entire ports collection and rebuild the affected ports (packages are not currently available for these ports). 1) Ports Collection 全体をアップグレードし, 弱点を持った port を 再構築します (現在, これらの port に対応する package は提供されていません). 2) Download a new port skeleton for the affected ports from: 2) 弱点を持つ各 port に対応する新しい port スケルトンを 以下の場所からダウンロードし, それらを使って port を再構築します. http://www.freebsd.org/ports/ and use it to rebuild the port. 3) Use the portcheckout utility to automate option (2) above. The portcheckout port is available in /usr/ports/devel/portcheckout or the package can be obtained from: 3) 上記 (2) の操作を自動的に行なう portcheckout ユーティリティを使います. portcheckout の port は /usr/ports/devel/portcheckout にあります. また, 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 で修正されたファイルの リビジョン番号の一覧です. Affected port (module) Path Revision 弱点を持った port 名 (モジュール名) パス名 リビジョン番号 - ------------------------------------------------------------------------- MIT Kerberos V (krb5) ports/security/krb5/Makefile 1.27 ports/security/krb5/files/patch-appl::telnet::telnetd::authenc.c 1.1 ports/security/krb5/files/patch-appl::telnet::telnetd::ext.h 1.2 ports/security/krb5/files/patch-appl::telnet::telnetd::slc.c 1.1 ports/security/krb5/files/patch-appl::telnet::telnetd::state.c 1.2 ports/security/krb5/files/patch-appl::telnet::telnetd::telnetd.c 1.2 ports/security/krb5/files/patch-appl::telnet::telnetd::termstat.c 1.1 ports/security/krb5/files/patch-appl::telnet::telnetd::utility.c 1.2 Heimdal (heimdal) ports/security/heimdal/Makefile 1.39 ports/security/heimdal/files/patch-ad 1.6 - ------------------------------------------------------------------------- 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:54,v 1.5 2001/09/24 19:07:01 hrs Exp $