CWE一覧に戻る
CWE-1291

デバッグコードと本番コードの両方に署名するための公開鍵の再利用

Public Key Re-Use for Signing both Debug and Production Code
脆弱性 レビュー中
JA

同じ公開鍵が、デバッグ・コードと本番コードの両方の署名に使われる。

公開鍵暗号の一般的な使い方は、他のエンティティ(例えばファームウェア・バイナリ)の完全 性と真正性を検証することである。ある企業が、自社のファームウェアが自社のハードウェア上でのみ実行されることを保証 したい場合、ファームウェアが実行される前に、ファームウェア・イメージの暗号化されたハッシュが 公開鍵で復号化され、その後、現在計算されているファームウェア・イメージのハッシュと照合さ れて検証されることになる。これは、公開鍵が信頼の根を形成することを意味し、公開鍵そのものが保護され、適切に使用されなけれ ばならないことを意味する。

開発段階において、デバッグ・ファームウェアは、多くのハードウェア・デバッグ・フック、デバッ グ・モード、およびテスト用のデバッグ・メッセージを可能にする。これらのデバッグ機能は、ファームウェアの能力に関する重要な追加的なビューを提供し、 場合によっては、チップや SoC に追加的な能力を提供する。もし侵害された場合、攻撃者はこれらの機能を悪用し、シス テムを完全に制御することが可能となる。

製品が製造段階を抜け、生産段階に入ったら、別の公開鍵を使用するのがグッドプラクティスである。デバッグ・ファームウェア・イメージは漏洩することが知られている。デバッグ・キーが本番用キーとして再利用されると、デバッグ・イメージは本番用イ メージ上でも動作する。そのため、攻撃者に対して、すべての内部デバッグ機能を公開することになる。

異なる公開鍵がプロダクション・イメージに使用された場合、攻撃者がデバッグ・ファームウェア・イ メージにアクセスしたとしても、それをプロダクション・マシン上で実行することはできない。したがって、被害は、デバッグ・イメージに起因する知的財産の漏洩に限定される。

EN

The same public key is used for signing both debug and production code.

A common usage of public-key cryptography is to verify the integrity and authenticity of another entity (for example a firmware binary). If a company wants to ensure that its firmware runs only on its own hardware, before the firmware runs, an encrypted hash of the firmware image will be decrypted with the public key and then verified against the now-computed hash of the firmware image. This means that the public key forms the root of trust, which necessitates that the public key itself must be protected and used properly.

During the development phase, debug firmware enables many hardware debug hooks, debug modes, and debug messages for testing. Those debug facilities provide significant, additional views about the firmware's capability and, in some cases, additional capability into the chip or SoC. If compromised, these capabilities could be exploited by an attacker to take full control of the system.

Once the product exits the manufacturing stage and enters production, it is good practice to use a different public key. Debug firmware images are known to leak. With the debug key being reused as the production key, the debug image will also work on the production image. Thus, it will open all the internal, debug capabilities to the attacker.

If a different public key is used for the production image, even if the attacker gains access to the debug firmware image, they will not be able to run it on a production machine. Thus, damage will be limited to the intellectual property leakage resulting from the debug image.

Scope: Confidentiality, Integrity, Availability, Access Control, Accountability, Authentication, Authorization, Non-Repudiation, Other / Impact: Read Memory; Modify Memory; Execute Unauthorized Code or Commands; Gain Privileges or Assume Identity; Varies by Context
Use different keys for Production and Debug.
MITRE公式ページ — CWE-1291