============================================================================= FreeBSD-SA-01:51 Security Advisory FreeBSD, Inc. トピック: OpenSSL 0.9.6a 以前には PRNG に問題がある (改訂版) カテゴリ: core モジュール: openssl 告知日: 2001-07-30 改訂日: 2001-07-31 クレジット: Markku-Juhani O. Saarinen The OpenSSL Project 影響範囲: 4.4 以前の全ての FreeBSD 4.x 修正日以前の FreeBSD 4.3-STABLE 修正日: 2001-07-19 21:00:45 UTC (FreeBSD 4.3-STABLE) 2001-07-19 21:01:08 UTC (FreeBSD 4.3-SECURITY aka RELENG_4_3) FreeBSD 固有: NO 0. 改訂履歴 - Revision History v1.0 2001-07-30 Initial release v1.1 2001-07-31 Corrected patch instructions v1.0 2001-07-30 初版 v1.1 2001-07-31 パッチを修正 I. 背景 - Background FreeBSD includes software from the OpenSSL Project. The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a full-strength general purpose cryptography library. FreeBSD には OpenSSL プロジェクトのソフトウェアが含まれている。OpenSSL プロジェクトは、Secure Scoket Layer (SSL v2/v3) プロトコルや Transport Layer Security (TLS) プロトコルのように、十分に強固な汎用暗号化ライブラリ の実装を開発するため協力して努力している。このライブラリは、堅牢で、商用 レベルの完全な機能を持つ、オープンソースのツールキットである。 II. 問題の詳細 - Problem Description A flaw in the pseudo-random number generator (PRNG) of OpenSSL versions previous to 0.9.6b allows an attacker to determine the PRNG state and future output under certain restricted conditions, thereby weakening the strength of the PRNG and any cryptographic protection which is derived from it. In effect, the flaw is that a portion of the PRNG state is incorrectly used as the PRNG output, allowing attackers to gain knowledge of the internal state of the PRNG by observing the output if they can sample it in a certain way. OpenSSL バージョン 0.9.6b 以前の擬似乱数生成機 (PRNG : pseudo-random number generator) には、ある制限された環境下において、攻撃者が PRNG の状態や未来の出力を決定できてしまう問題がある。これによって PRNG や PRNG を使っている暗号による防御の強度が弱まってしまう。PRNG の状態の 一部が PRNG の出力として誤って使用されるという問題のために、なんらかの 方法でサンプルを収集できた攻撃者は、その出力を観察することによって PRNG の内部状態に関してより多くの情報を得る事ができる。 An attack taking advantage of this flaw has been identified that can recover the complete state of the PRNG from the output of one carefully sized PRNG request followed by a few hundred consecutive 1-byte PRNG requests. この問題を利用した攻撃は、数百個の連続した1バイトの PRNG リクエストに 続く、注意深くサイズを決めた1つの PRNG リクエストの出力から、PRNG の 完全な状態を復元できるというものだと考えられている。 This access pattern is not typically obtainable in real-world uses of the PRNG in cryptographic protocols, and no exploit against a protocol supported by OpenSSL is currently known. このアクセスパターンは、PRNG を実際の暗号化プロトコルで使用する場合には 通常得られないものである。また、現時点では OpenSSL がサポートしている プロトコルに対する攻撃方法はは知られていない。 III. 影響範囲 - Impact By successfully exploiting a flaw in the PRNG, an attacker can gain important information that may allow him to deduce nonces (leading to the compromise of the protocol session) or encryption keys (allowing the attacker to obtain the plaintext of the encrypted data). PRNG の欠陥を利用した攻撃が成功すると、攻撃者は(そのプロトコルセッションの 不正使用を可能にするような)一時的な情報や、暗号化鍵(攻撃者が暗号化された データの平文を入手できる)を推測できるような、重要な情報が得られる。 Whether or not this flaw is exploitable depends upon the specifics of the application using OpenSSL. No vulnerable applications or protocols are currently known. この欠陥を利用した攻撃が行えるかどうかは、OpenSSL を使用しているアプリ ケーションの仕様に依存する。現在のところ、脆弱性のあるアプリケーションや プロトコルは見つかっていない。 IV. 回避方法 - Workaround None applicable. 有効な回避方法はない。 V. 解決法 - Solution One of the following: 以下のいずれかの方法がある: 1) Upgrade your vulnerable FreeBSD system to 4.3-STABLE or the 4.3-SECURITY (aka RELENG_4_3) security branch after the respective correction dates. 1) 脆弱性のある FreeBSD システムを、それぞれの修正日以降の 4.3-STABLE か 4.3-SECURITY(別名 RELENG_4_3)セキュリティブランチにアップグレードする。 2) FreeBSD 4.x systems prior to the correction date: 2) 修正日以前の FreeBSD 4.x システムの場合: The following patch have been verified to apply to FreeBSD 4.2-RELEASE, 4.3-RELEASE and 4.3-STABLE dated prior to the correction date. These patches may or may not apply to older, unsupported releases of FreeBSD. 以下のパッチは、FreeBSD 4.2-RELEASE、4.3-RELEASE、および修正日以前の 4.3-STABLE への適用が確認されている。これより古い、サポートされていない リリースの FreeBSD については、正しく適用できない可能性がある。 Download the patch and the detached PGP signature from the following locations, and verify the signature using your PGP utility. 以下の場所からパッチと PGP シグネチャをダウンロードし、PGP ユーティリティを 使ってシグネチャを確認する。 ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:51/openssl.patch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:51/openssl.patch.asc # cd /usr/src/ # patch -p < /path/to/patch # cd /usr/src/secure/lib/libcrypto/ # make depend && make all install One must also recompile any statically linked applications that use OpenSSL's PRNG. There are no such applications in the base system. また、OpenSSL の PRNG を使用するアプリケーションのうち、静的リンクしている ものは全て再コンパイルしなければならない。FreeBSD の基本システムには、その ようなアプリケーションはない。 3) FreeBSD 4.3-RELEASE systems: 3) FreeBSD 4.3-RELEASE システムの場合: 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. インストール処理中に、パッケージによって上書きされるファイルのバック アップコピーが作成される。このバックアップコピーは、パッケージが削除 されると再インストールされ、システムをパッチを当てる前の状態に戻す。 # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:51/security-patch-openssl-01.51.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:51/security-patch-openssl-01.51.tgz.asc Verify the detached PGP signature using your PGP utility. PGP ユーティリティを使って PGP シグネチャを確認する。 # pkg_add security-patch-openssl-01.51.tgz VI. 修正の詳細 - Correction details The following list contains the revision numbers of each file that was corrected for the maintained versions of FreeBSD. 以下のリストは、修正済みのバージョンの FreeBSD で修正済みの各ファイルの リビジョン番号の一覧である。 FreeBSD Version and CVS Tag Path Revision ------------------------------------------------------------------------- FreeBSD 4.3-SECURITY (tag: RELENG_4_3) src/crypto/openssl/crypto/rand/md_rand.c 1.1.1.1.2.2.2.1 FreeBSD 4.3-STABLE (tag: RELENG_4) src/crypto/openssl/crypto/rand/md_rand.c 1.1.1.1.2.4 ------------------------------------------------------------------------- VII. 参考文献 - References