============================================================================= FreeBSD-SA-02:12 Security Advisory FreeBSD, Inc. トピック: squid の port に存在する複数のセキュリティ上の脆弱性 (multiple security vulnerabilities in squid port) カテゴリ: ports モジュール: squid24 告知日: 2002-02-21 クレジット: Jouko Pynnonen Henrik Nordstrom 影響範囲: 修正日より前の Ports collection 修正日: 2002-02-19 13:46:22 UTC FreeBSD 固有: NO I. 背景 - Background The Squid Internet Object Cache is a web proxy/cache. Squid Internet Object Cache は web の proxy と cache の機能を提供する ソフトウェアです。 II. 問題の詳細 - Problem Description The following security vulnerabilities are known to exist in versions of Squid prior to 2.4-STABLE4 (port version 2.4_8): 2.4-STABLE4 (port のバージョンでは 2.4_8) より前のバージョンの squid には、以下のセキュリティ上の脆弱性が存在することが確認されています。 1) The optional SNMP monitoring interface suffers from a memory leak. The FreeBSD port does not normally include this code, but it can be enabled with a compile-time option. 1) オプションの SNMP 監視インターフェイスがメモリリークの影響を受け ます。通常、FreeBSD の port はこのコードを含んでいませんが、コンパイル 時のオプションで有効にすることもできます。 2) A buffer overflow exists in the code charged with parsing the authentication portion of FTP URLs. 2) FTP の URL に含まれる認証用データ部を解析するのに利用される コードにバッファオーバーフローが存在します。 3) The optional HTCP interface can not be properly disabled at run-time. The FreeBSD port does not normally include this code, but it can be enabled with a compile-time option. 3) 実行時に(訳注: 設定ファイル squid.conf に HTCP を無効にする設定を 記述しても)オプションの HTCP インターフェイスを無効化することができ ません。通常、FreeBSD の port はこのコードを含んでいませんが、コンパイル 時のオプションで有効にすることもできます。 The squid port is not installed by default, nor is it "part of FreeBSD" as such: it is part of the FreeBSD ports collection, which contains thousands of third-party applications in a ready-to-install format. The ports collection shipped with FreeBSD 4.5 contains this problem since it was discovered after the release. squid の port はデフォルトではインストールされていませんし、 「FreeBSD の一部」でもありません。それは数千種類のサードパーティ製 アプリケーションをすぐにインストール可能な形式で収録した FreeBSD ports collection の一部です。FreeBSD 4.5 のリリース後にこの脆弱性 が発見されたため、FreeBSD 4.5 と共にリリースされた ports 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 1) An attacker with the ability to send packets to the Squid SNMP port can cause Squid to run out of memory and crash. (NOTE: The FreeBSD port does not have SNMP enabled by default.) 1) Squid の SNMP ポートにパケットを送ることができる攻撃者は、Squid に メモリを使い果たさせ、クラッシュさせることができます。(注意: FreeBSD の port は、デフォルトでは SNMP インターフェイスは有効になっていません) 2) An authorized user of the squid proxy may submit a specially crafted ftp:// request in order to crash the squid process, causing a denial of service. It may also be possible to cause the execution of arbitrary code with the privilege level of the squid process, although no such exploits are known to exist at this time. squid proxy の利用権限があるユーザは、特別に作成した ftp:// 形式 のリクエストを送ることによって squid のプロセスをクラッシュさせ、 サービス拒否状態を引き起こすことができます。squid のプロセスを動作 させているユーザの権限で任意のコードを実行できる可能性もありますが、 今のところ具体的な攻撃方法は知られていません。 3) Unauthorized users may utilize cache resources by using HTCP. (NOTE: The FreeBSD port does not have HTCP enabled by default.) 3) squid の利用権限がないユーザが、HTCP を利用して squid の cache を 無断で利用できる可能性があります。(注意: FreeBSD の port は、デフォルト では HTCP は有効になっていません) IV. 回避方法 - Workaround 1) As regards the SNMP issue, the following configuration statement will disable the SNMP support altogether: 1) SNMP の問題に関しては、以下の設定文で SNMP のサポート完全に無効に することができます。 snmp_port 0 2) Optionally, set up a firewall rule to block incoming packets to the Squid SNMP port (normally, UDP port 3401) from untrusted hosts. 2) その他に、信頼できないホストから Squid の SNMP ポート(通常は UDP の 3401 番ポート)へ送られてくるパケットをブロックするようにファイア ウォールのルールを設定する方法もあります。 3) For the second vulnerability, deny forwarding of non-anonymous FTP URLs by inserting the following rules at the top of squid.conf, prior to any http_access allow lines: 3) 2番目の脆弱性に関しては、squid.conf ファイルの先頭(http_access allow 行より前)に以下のルールを追加して anonymous FTP 以外の FTP URL を受け付けないようにします: acl non_anonymous_ftp url_regex -i ftp://[^/@]*@ http_access deny non_anonymous_ftp 4) No workaround exists for the HTCP issue except to set up a firewall rule to block incoming packets to the Squid HTCP port (normally, UDP port 4827) from untrusted hosts. 4) HTCP の問題に関しては回避方法がないため、信頼できないホストから Squid の HTCP ポート(通常 UDP の 4827 番ポート)へ送られてくる パケットをブロックするようにファイアウォールのルールを設定することで 対処します。 5) Alternatively, deinstall the squid port/package. 5) (1)〜(4) 以外の方法として、squid の port や package を削除するという 手段があります。 V. 解決法 - Solution Do one of the following: 以下のいずれかを実行してください: 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/www/ squid-2.4_8.tgz ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-5-current/www/ squid-2.4_8.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 squid port from: 3) 以下から squid 用の新しい port skeleton をダウンロードします: 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 revision numbers of each file that was corrected in the FreeBSD ports collection. 以下のリストは、FreeBSD ports collection の中で修正されたファイルの リビジョン番号です。 Path Revision - ------------------------------------------------------------------------- ports/www/squid24/Makefile 1.87 ports/www/squid24/distinfo 1.63 - ------------------------------------------------------------------------- VII. 参考資料 - References