============================================================================= FreeBSD-SA-02:10 Security Advisory FreeBSD, Inc. トピック: rsync の port に存在するリモートから悪用可能な脆弱性 (rsync port contains remotely exploitable vulnerability) カテゴリ: ports モジュール: rsync 告知日: 2002-02-06 クレジット: Sebastian Krahmer 影響範囲: 修正日より前の Ports collection 修正日: 2002-01-23 23:32:21 UTC FreeBSD 固有: NO I. 背景 - Background rsync is a powerful network file distribution/synchronization utility. rsync はネットワーク上でファイルの配布や同期を行う強力なユーティリティ です。 II. 問題の詳細 - Problem Description The rsync port, versions prior to rsync-2.5.1_1, is not careful enough about reading integers from the network. In several places, signed and unsigned numbers are mixed, resulting in erroneous computations of buffer offsets. rsync-2.5.1_1 より前のバージョンの port には、十分な注意を払わずに ネットワークから整数データを読み込んでしまうという問題があります。 そのため、符号付きと符号なしの数値が混ざり合って使用されている ネットワークでは、バッファのオフセット値が誤って計算される場合が あります。 The rsync 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.5 contains the corrected version of this port (rsync-2.5.1_1). rsync の port はデフォルトではインストールされていませんし、 「FreeBSD の一部」でもありません。これは 6000 以上のサード パーティ製アプリケーションをすぐにインストールできる形式で 収録した FreeBSD ports collection の一部です。FreeBSD 4.5 と共にリリースされた ports collection には、修正版の port (rsync-2.5.1_1) が含まれています。 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 A remote attacker may cause rsync to write NUL bytes onto its stack. This can be exploited in order to execute arbitrary code with the privileges of the user running rsync. This is particularly damaging for sites running rsync in server mode, although a hostile server may also affect rsync clients. リモートの攻撃者は rsync のスタックに NUL バイト列を書き込むことが できます。これを利用すると、rsync を動作させているユーザの権限で 任意のコードが実行できてしまいます。この問題は、特に rsync を サーバモードで実行しているサイトに被害を与えますが、rsync のクライ アントも影響を受ける可能性があります。 IV. 回避方法 - Workaround 1) Deinstall the rsync ports/packages if you have them installed. 1) rsync の ports や package をインストールしている場合は、これを 削除します。 V. 解決法 - Solution 1) Upgrade your entire ports collection and rebuild the port. 1) ports collection 全体をアップグレードし、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/net/rsync-2.5.1_1.tgz ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/net/rsync-2.5.1_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 rsync port from: 3) 以下から rsync 用の新しい 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/Latest/portcheckout.tgz ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/Latest/portcheckout.tgz VI. 修正の詳細 - Correction details The following list contains the $FreeBSD$ revision numbers of each file that was corrected in the FreeBSD source. 以下のリストは、FreeBSD のソース中で修正されたファイルの $FreeBSD$ リビジョン番号です。 Path Revision - ------------------------------------------------------------------------- ports/net/rsync/Makefile 1.61 ports/net/rsync/files/patch-251-secfix 1.1 - ------------------------------------------------------------------------- VII. 参考資料 - References