新型Spectre CPUハードウェアの脆弱性が発見されました

2018.07.30

投稿者 :Justin Brunnette

カテゴリ: IT News

グッモーニン ブルーネットです

セキュリティ業界にも結構動きがあるみたいなので、面白くもなってきています。
元の記事は:

https://www.theregister.co.uk/2018/07/23/spectre_return_stack_buffer

[日本語]


新型Spectre CPUハードウェアの脆弱性が発見されました
 
昨年のセキュリティ業界で最大のニュースは、Wannacryランサムウェアの発生でした。 Wannacryはおそらく150ヶ国以上の200,000台以上のコンピュータに感染しており、現在までに最も破壊的なウイルスです。 ほとんどのコンピュータウイルスはソフトウェア系なので対策を探すには少なくとも手だてはあります。しかし、ハードウェア側に存在する脆弱性を利用したウィルスは珍しくて、セキュリティとして対応するのは大変です。 Spectreはその一つでセキュリティ業界で悪名高いウィルスです。セキュリティ研究者のチームはSpectreの新しいバリエーションを発見して、Spectreのさらなる効力を明らかにしました。
 
Spectreの名前は、投機的実行におけるハードウェアの利用、英語では「Speculative Execution」と言う演算から来たものです。 投機的実行とは、プログラムの使用履歴を見てからプログラムがどう実行する処理の予測して、より高速に実行することです。投機的実行が行われている時には、プログラム内の任意のメモリ位置への偽装アクセスが容易になります。 これにより、アクセスされたメモリの内容を開いたままにしておくことができ、機密情報がアクセスされることができます。
 
投機実行は、プロセッサまたは物理のCPUの構造の特徴部分です。 これがハードウェアの脆弱性を引き起こすのは難しいことなので、弱点の対策を見つかる方法は確立されていません。 その上に、ソフトウェアバグを利用して実行したものではありません。
 
ダートマウス(Dartmouth)の研究者は、Spectre 1.1とSpectre 1.2と呼ばれるSpectreの新しい変種を発見しました。 1.1の攻撃は投機的実行を利用してCPUの内部キャッシュバッファのオーバーフローを引き起こし、悪意のあるコードを実行して以前にCPUのキャッシュにあったデータを取り出します。 Spectre 1.2では、読み取り専用のフラグで保護されているはずのCPUメモリに書き込むことがでできますし、サンドボックスが無効になります。
 
IntelやAMDなどのチップ製造会社に脆弱性を報告されていますが、パッチはまだ発行されてはいません。 この問題はかなり深刻なので、インテル社は元のSpectreのバグを発見した研究チームに10万ドルの賞金を支払ました。
 
この発見にさらに、カリフォルニア大学リバーサイドの別の研究チームは、SpectreRSBという別のバリエーションのSpectreを発見しました。 これは、分岐予測器(branch predictor)ではなくリターンアドレスの予測を行うCPUのシステム、リターンスタックバッファ(RSB)を利用しています。 このSpectreは、他のSpecterと同じ目標を達成しており、パスワードやキーなどの機密情報にアクセスできます。
 
SpectreRSBは、CPUに投機的実行を間違わせるよう強制する機能です。 これでコール命令x86をRSBに値をプッシュして、RSBとの長い一致に応じてコール命令のリターンアドレスが返されるようにします。 研究者はこれがどのように行われるかの説明のためにサンプルコードを提供しました:
 



 

Spectre RSBはSpectreの変種ですが、それを緩和する効果的な方法があるようです。サイドチャネル緩和を使用すると、SpectreRSBを安全化できる可能性があることはAMDが確認しました。 Spectreを野生のマルウェアが使用してるのはまだ発見されておりませんが少なくとも被害が出る前に情報が共有される事はいいと思います。

[English]
 


 

New Versions of the Spectre CPU Hardware Vulnerabilities Have Been Discovered
 
One of the largest news in the security world last year was the outbreak of the Wannacry ransomware. Wannacry is perhaps the most destructive virus to date as it infected over 200,000 computers on over 150 countries. As damaging as most computer viruses are, large number of them are limited to the software exploitations, which allows for easier mitigation. The Spectre Vulnerability is of a different breed, as the vulnerability lies in the hardware side. Earlier this month, researchers a have revealed a new variations of the exploit revealing further potency of Spectre.
 
Spectre gets it’s name from the hardware exploitation in speculative execution. Speculative execution is where your processor attempts to make predictions on what a program will do based on the usage history of the program in order to run faster. When the program is executing this, it is vulnerable to being tricked to access arbitrary memory locations in the program. This can leave the contents of the accessed memory open to be read, thus leaving sensitive information exposed to attackers.
 
Speculative execution is a feature part of a processor or the physical cpu’s architecture. The difficulty that this causes that hardware exploits have been few and far between and there have been no established method to approach such a weakness. It also does not rely on any sort of software bug to be executed.
 
Researchers at Dartmouth have found new variants to Spectre, which they have dubbed Spectre 1.1 and Spectre 1.2. The 1.1 attacks takes advantage of speculative execution to cause an overflow of a CPU’s internal cache buffers in order to run malicious code to retrieve whatever data that was previously in the CPU’s cache. Spectre 1.2 on the other hand, can write on CPU memory that are supposed to be protected by read-only flags which makes sandboxing ineffective.
 
Although chip manufactures, such as Intel and AMD, have been contacted and made known about these vulnerabilities, no patches have yet to be issued. The severity of the problem has led Intel to pay the research team a $100,000 bounty for discovering the original Spectre bug.
 
In addition to this finding, another research team from University of California – Riverside has discovered another variation called SpectreRSB. This one exploits the return stack buffer (RSB), the system in CPUs that make predictions on return addresses rather than branch predictor units. This Spectre achieves the same goal as other Spectres, gaining access to sensitive information such as passwords and keys, that it shouldn’t be able to have access to.
 
The SpectreRSB forces the CPU to make a mistake in the speculative execution. This causes the call instruction x86 to push values to RSB to that the return address for the call instruction on longer match the RSB. The researchers provided sample code of how this is done:
 
 
 
AMD has weighed in on the discovery and have confirmed that using side-channel mitigations can seduce SpectreRSB. While Spectre RSB is a variation of Spectre, there does seem to be effective ways to mitigate it. This is good to know as it is discovered before any malware out in the wild had any chance to use it (to our knowledge at least. )