============================================================================= FreeBSD-SA-02:05 Security Advisory FreeBSD, Inc. トピック: pine の port における安全でない URL の取り扱い (pine port insecure URL handling) カテゴリ: ports モジュール: pine 告知日: 2002-01-04 クレジット: zen-parse 影響範囲: 修正日以前の Ports collection 修正日: 2001-10-05 08:41:39 UTC FreeBSD 固有: NO I. 背景 - Background PINE is an application for reading mail and news. PINE はメーラとニュースリーダの機能を持ったアプリケーションです。 II. 問題の詳細 - Problem Description The pine port, versions previous to pine-4.40, handles URLs in messages insecurely. PINE allows users to launch a web browser to visit a URL embedded in a message. Due to a programming error, PINE does not properly escape meta-characters in the URL before passing it to the command shell as an argument to the web browser. pine-4.40 以前の port は、メッセージ中の URL を安全でない方法で処理 します。PINE はメッセージ中の URL を表示するためにウェブブラウザを起動 する機能がありますが、プログラミングのミスにより、この URL に含まれる メタキャラクタを適切にエスケープせずに、ウェブブラウザを起動する際の 引数としてシェルに渡してしまいます。 The pine 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. pine の port はデフォルトではインストールされていませんし、"FreeBSD の 一部" でもありません。それは 6000 以上のサードパーティ製アプリケーション をすぐにインストールできる形式で収録した FreeBSD ports collection の一部 です。FreeBSD 4.4 のリリース後にこの問題が発見されたため、4.4 と共にリ リースされた port collection にはこの問題が含まれています。 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 An attacker can supply commands enclosed in single quotes ('') in a URL embedded in a message sent to the victim. If the user then decides to view the URL, PINE will launch a command shell which will then execute the attacker's commands with the victim's privileges. It is possible to obfuscate the URL so that it will not necessarily seem dangerous to the victim. 攻撃者は、シングルクオート ('') で囲まれたコマンドを組み込んだ URL を含め たメッセージを犠牲者に送ることができます。メッセージを受け取ったユーザが この URL を表示しようとすると、PINE はシェルを起動し、犠牲者の権限で攻撃 者が URL に組み込んだコマンドを実行してしまいます。この URL は、犠牲者に 危険性を悟られないように分かりにくくすることも可能です。 IV. 回避方法 - Workaround 1) Deinstall the pine port/package if you have it installed. 1) pine の port や package をインストールしている場合は、これを削除します。 V. 解決法 - Solution 1) Upgrade your entire ports collection and rebuild the port. 1) ports collection 全体をアップグレードし、pine の port をリビルドします。 2) Deinstall the old package and install a new package dated after the correction date, obtained from the following directories: 2) 古いパッケージを削除し、以下の場所から入手した修正日以降の新しい package をインストールします: [i386] ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/mail/pine-4.43.tgz ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/mail/pine-4.43.tgz [alpha] Packages are not automatically generated for the alpha architecture at this time due to lack of build resources. package をビルドするためのリソースが不足しているため、現時点では alpha アーキテクチャ用 package の自動生成は行っていません。 3) Download a new port skeleton for the pine port from: 3) 以下から pine 用の新しい 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 $FreeBSD$ revision numbers of each file that was corrected in the FreeBSD source 以下は FreeBSD のソース中で修正された各ファイルの $FreeBSD$ リビジョン 番号のリストです。 Path Revision ------------------------------------------------------------------------- ports/mail/pine4/Makefile 1.58 ports/mail/pine4/distinfo 1.18 ports/mail/pine4/files/patch-aa 1.4 ports/mail/pine4/files/patch-ac 1.11 ports/mail/pine4/files/patch-af 1.12 ports/mail/pine4/files/patch-ai 1.11 ports/mail/pine4/files/patch-aj 1.5 ports/mail/pine4/files/patch-ak 1.6 ports/mail/pine4/files/patch-al 1.10 ports/mail/pine4/files/patch-am 1.6 ports/mail/pine4/files/patch-an 1.5 ports/mail/pine4/files/patch-ap 1.3 ports/mail/pine4/files/patch-at 1.6 ports/mail/pine4/files/patch-au 1.4 ports/mail/pine4/files/patch-ax 1.4 ports/mail/pine4/files/patch-az 1.3 ports/mail/pine4/files/patch-be 1.1 ports/mail/pine4/files/patch-bf 1.1 ports/mail/pine4/files/patch-bg 1.1 ports/mail/pine4/files/patch-reply.c 1.2 -------------------------------------------------------------------------