FreeBSD-SA-06:14.fpu "FPU information disclosure"

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

  • 危険度低

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

I. 背景 - Background

The floating-point unit (FPU) of i386 and amd64 processors is derived from the original 8087 floating-point co-processor. As a result, the FPU contains the same debugging registers FOP, FIP, and FDP which store the opcode, instruction address, and data address of the instruction most recently executed by the FPU.
i386およびamd64プロセッサの浮動小数点演算装置(FPU)は最初の8087浮動小数コプロセッサに由来します。その結果、FPUは一番最近に実行した命令のオペコード、命令アドレス、データアドレスといったデバッグレジスタを含んでいます。
On processors implementing the "SSE" instruction set, a new pair of instructions fxsave/fxrstor replaces the earlier fsave/frstor pair used for saving and restoring the FPU state. These new instructions also save and restore the contents of the additional registers used by SSE instructions.
「SSE」命令セットを実装するプロセッサは、FPU状態の保存と復帰のために、fsave/frstorペアよりも早い新しい命令ペア fxsave/fxrstor を使用します。

II. 問題の詳細 - Problem Description

On "7th generation" and "8th generation" processors manufactured by AMD, including the AMD Athlon, Duron, Athlon MP, Athlon XP, Athlon64, Athlon64 FX, Opteron, Turion, and Sempron, the fxsave and fxrstor instructions do not save and restore the FOP, FIP, and FDP registers unless the exception summary bit (ES) in the x87 status word is set to 1, indicating that an unmasked x87 exception has occurred.
AMDにより製造されたAMD AthlonDuronAthlon MP、Athlon XP、Athlon64Athlon64 FX、OpteronTurion、そしてSempronを含む「第7世代」と「第8世代」プロセッサにおいて、もしx87ステータスワードの例外サマリビット(ES)がx87例外の発生をマスクしないことを意味する1にセットされていなければ、fxsaveとfxrstor命令はFOP、FIPとFDPレジスタを保存、復帰をしません。
This behaviour is consistent with documentation provided by AMD, but is different from processors from other vendors, which save and restore the FOP, FIP, and FDP registers regardless of the value of the ES bit. As a result of this discrepancy remaining unnoticed until now, the FreeBSD kernel does not restore the contents of the FOP, FIP, and FDP registers between context switches.
この振舞はAMDの提供するドキュメントに矛盾しませんが、ESビットの値に関わらずFOP、FIPとFDPレジスタを保存、復帰する他のベンダのプロセッサとは違います。今まで顧みられなかったこの食い違いにより、FreeBSDカーネルコンテキストスイッチの間にFOP、FIPとFDPレジスタの内容が復帰しません。

III. 影響範囲 - Impact

On affected processors, a local attacker can monitor the execution path of a process which uses floating-point operations. This may allow an attacker to steal cryptographic keys or other sensitive information.
影響するプロセッサでは、ローカルの攻撃者が浮動小数点命令を使用するプロセスの実行順序をモニタ出来ます。これは暗号鍵を盗んだり他の機密情報の取得を可能とします。

IV. 回避方法 - Workaround

No workaround is available, but systems which do not use AMD Athlon, Duron, Athlon MP, Athlon XP, Athlon64, Athlon64 FX, Opteron, Turion, or Sempron processors are not vulnerable.
回避方法は存在しませんが、AMD AthlonDuronAthlon MP、Athlon XP、Athlon64Athlon64 FX、OpteronTurion、そしてSempronプロセッサを使用していないシステムは脆弱ではありません。