2229
Effectiveness = Moderate
Simulation / Emulation
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.
Effectiveness = Moderate
Manual Analysis
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.
Effectiveness = Moderate
Potential Mitigations
Phase: Architecture and Design
Design strategies for ensuring safe failure if inputs, such as Vcc, are modified out of acceptable
ranges.
Phase: Architecture and Design
Design strategies for ensuring safe behavior if instructions attempt to be skipped.
Phase: Architecture and Design
Identify mission critical secrets that should be wiped if faulting is detected, and design a
mechanism to do the deletion.
Phase: Implementation
Add redundancy by performing an operation multiple times, either in space or time, and perform
majority voting. Additionally, make conditional instruction timing unpredictable.
Phase: Implementation
Use redundant operations or canaries to detect and respond to faults.
Phase: Implementation
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.
Demonstrative Examples
Example 1:
A smart card contains authentication credentials that are used as authorization to enter a building.
The credentials are only accessible when a correct PIN is presented to the card.
Example Language: (Bad)
The card emits the credentials when a voltage anomaly is injected into the power line to the device at a particular time after
providing an incorrect PIN to the card, causing the internal program to accept the incorrect PIN.
There are several ways this weakness could be fixed.
Example Language: (Good)
• add an internal filter or internal power supply in series with the power supply pin on the device
• add sensing circuitry to reset the device if out of tolerance conditions are detected
CWE Version 4.14
CWE-1333: Inefficient Regular Expression Complexity
CWE-1333: Inefficient Regular Expression Complexity