COMMON WEAKNESS ENUMERATIONStable

CWE-1332

Improper Handling of Faults that Lead to Instruction Skips

The device is missing or incorrectly implements circuitry or sensors that detect and mitigate the skipping of security-critical CPU instructions when they occur.

Soyutlama

Base

Yapı

Simple

Sömürü İhtimali

Medium

Problemi anla

Problem nedir?

The device is missing or incorrectly implements circuitry or sensors that detect and mitigate the skipping of security-critical CPU instructions when they occur.

Genişletilmiş açıklama

The operating conditions of hardware may change in ways that cause unexpected behavior to occur, including the skipping of security-critical CPU instructions. Generally, this can occur due to electrical disturbances or when the device operates outside of its expected conditions. In practice, application code may contain conditional branches that are security-sensitive (e.g., accepting or rejecting a user-provided password). These conditional branches are typically implemented by a single conditional branch instruction in the program binary which, if skipped, may lead to effectively flipping the branch condition - i.e., causing the wrong security-sensitive branch to be taken. This affects processes such as firmware authentication, password verification, and other security-sensitive decision points. Attackers can use fault injection techniques to alter the operating conditions of hardware so that security-critical instructions are skipped more frequently or more reliably than they would in a "natural" setting.

Kök neden

Problem nasıl ve ne zaman oluşur?

Yaşam döngüsü evresi

Architecture and Design

Failure to design appropriate countermeasures to common fault injection techniques can manifest this weakness.

Yaşam döngüsü evresi

Implementation

This weakness can arise if the hardware design incorrectly implements countermeasures to prevent fault injection.

Risk

Başarılı sömürü neye yol açar?

Bypass Protection MechanismAlter Execution LogicUnexpected State

Etkilenen güvenlik alanları: Confidentiality, Integrity, Authentication

Depending on the context, instruction skipping can have a broad range of consequences related to the generic bypassing of security critical code.

Savunma

Nasıl önlenir ve çözülür?

Architecture and Design

Mimari ve tasarım yaklaşımı

Detay
Design strategies for ensuring safe failure if inputs, such as Vcc, are modified out of acceptable ranges.

Architecture and Design

Mimari ve tasarım yaklaşımı

Detay
Design strategies for ensuring safe behavior if instructions attempt to be skipped.

Architecture and Design

Mimari ve tasarım yaklaşımı

Detay
Identify mission critical secrets that should be wiped if faulting is detected, and design a mechanism to do the deletion.

Implementation

Uygulama aşaması savunması

Detay
Add redundancy by performing an operation multiple times, either in space or time, and perform majority voting. Additionally, make conditional instruction timing unpredictable.

Implementation

Uygulama aşaması savunması

Detay
Use redundant operations or canaries to detect and respond to faults.

Implementation

Uygulama aşaması savunması

Detay
Ensure that fault mitigations are strong enough in practice. For example, a low power detection mechanism that takes 50 clock cycles to trigger at lower voltages may be an insufficient security mechanism if the instruction counter has already progressed with no other CPU activity occurring.

Doğrulama

Nasıl tespit edilir?

Automated Static Analysis

Moderate
This weakness can be found using automated static analysis once a developer has indicated which code paths are critical to protect.

Simulation / Emulation

Moderate
This weakness can be found using automated dynamic analysis. Both emulation of a CPU with instruction skips, as well as RTL simulation of a CPU IP, can indicate parts of the code that are sensitive to faults due to instruction skips.

Manual Analysis

Moderate
This weakness can be found using manual (static) analysis. The analyst has security objectives that are matched against the high-level code. This method is less precise than emulation, especially if the analysis is done at the higher level language rather than at assembly level.