FreeBSD-SA-05:09.htt "information disclosure when using HTT"

The FreeBSD Project よりセキュリティ勧告が出ました。要点を以下にまとめます。

  • HTT(Hyper-Threading Technology)は複数スレッド間でメモリキャッシュを含むいくらかのCPU資源の共有を行なっており、これに起因して悪意あるスレッドが別のスレッドの実行状態をモニタすることができる。
  • これによりマルチユーザ環境で秘密鍵を盗める可能性が実証された。
  • HTTを実装していない環境またはHTTを無効にした環境ではこの脆弱性の影響を受けない。
  • しかしSMT(Simultaneous Multi-Threading)を実装するプロセッサでは同様の可能性がある。

セキュリティ勧告は ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-05:09.htt.asc にあります。
以下は上記のセキュリティ勧告の一部とその訳文です。ただし品質は保証致しません。

0. 改訂履歴 - Revision History

v1.0 2005-05-13
Initial release.
v1.1 2005-05-13
Additional details.

I. 背景 - Background

Sharing the execution resources of a superscalar processor between multiple execution threads is referred to as "simultaneous multithreading". "Hyper-Threading Technology" or HTT is the name used for the implementation of simultaneous multithreading on Intel Pentium 4, Mobile Pentium 4, and Xeon processors. HTT involves sharing certain CPU resources between multiple threads, including memory caches. FreeBSD supports HTT when using a kernel compiled with the SMP option.
複数の実行スレッド間でのスーパースカラプロセッサの実行資源共有は、「Simultaneous Multi-Threading:SMT」と呼ばれます。「Hyper-Threading Technology」またはHTTは、Intel Pentium4、Mobile Pentium4およびXeonプロセッサにおけるSMTの実装に対して使用されている名称です。HTTは複数スレッド間でメモリキャッシュを含むいくらかのCPU資源の共有をともないます。SMPオプション付きでコンパイルしたカーネルを使用した時、FreeBSDはHTTをサポートします。

II. 問題の詳細 - Problem Description

When running on processors supporting Hyper-Threading Technology, it is possible for a malicious thread to monitor the execution of another thread.
Hyper-Threading Technologyをサポートするプロセッサ上で走る場合、悪意あるスレッドは別のスレッドの実行をモニタすることができます。
NOTE: Similar problems may exist in other simultaneous multithreading implementations, or even some systems in the absence of simultaneous multithreading. However, current research has only demonstrated this flaw in Hyper-Threading Technology, where shared memory caches are used.
注:同様の問題は、他のSMTインプリメンテーション、あるいはいくつかのシステムでSMTのない場合にさえ存在するかもしれません。しかしながら、現在の調査では、単にシェアードメモリキャッシュが使用されているHTTでこの欠陥を実証しただけです。
A security flaw involving operating systems running on Hyper-Threading Technology processors was has been reported. Complete details are not available at the time of this writing. However, a workaround has been issued. It is expected that more details will be available tomorrow, at which time a revised version of this advisory will be published.
Hyper-Threading Technologyプロセッサ上で走るオペレーティングシステムに含まれるセキュリティ欠陥が報告されました。この記述の時点では、完全な詳細は得られていません。しかしながら、回避方法が出されています。より多くの詳細は明日得られるであろうことが期待され、その時にこの勧告の改訂されたバージョンが公表されるでしょう。

III. 影響範囲 - Impact

Information may be disclosed to local users, allowing in many cases for privilege escalation. For example, on a multi-user system, it may be possible to steal cryptographic keys used in applications such as OpenSSH or SSL-enabled web servers.
多くの場合に高い権限を得ることを許す情報がローカルユーザに公開されます。
例えば、マルチユーザーシステムにおいて、OpenSSHあるいはSSL対応のウェブサーバのようなアプリケーションの中で使用される暗号化キーを盗むことが可能かもしれません。

IV. 回避方法 - Workaround

Systems not using processors with Hyper-Threading Technology support are not affected by this issue. On systems which are affected, the security flaw can be eliminated by setting the "machdep.hlt_logical_cpus" tunable:
Hyper-Threading Technologyサポートを持つプロセッサを使用しないシステムはこの問題による影響を受けません。影響されるシステムにおいて、「machdep.hlt_logical_cpus」を変更することによりセキュリティ欠陥を除去することができます:

# echo "machdep.hlt_logical_cpus=1" >> /boot/loader.conf

The system must be rebooted in order for tunables to take effect.
変更の効果を現わすためにはシステムをリブートしなければなりません。
Use of this workaround is not recommended on "dual-core" systems, as this workaround will also disable one of the processor cores.
この回避方法はプロセッサコアのうちの1つもまた不能にするので、この回避方法の使用は「デュアルコア」のシステムでは勧められません。

><