CWE-1332
Description
The device is missing or incorrectly implements circuitry or sensors that detect and mitigate the skipping of security-critical CPU instructions when they occur.
Consequences
Mitigations
Design strategies for ensuring safe failure if inputs, such as Vcc, are modified out of acceptable ranges.
Design strategies for ensuring safe behavior if instructions attempt to be skipped.
Identify mission critical secrets that should be wiped if faulting is detected, and design a mechanism to do the deletion.
Add redundancy by performing an operation multiple times, either in space or time, and perform majority voting. Additionally, make conditional instruction timing unpredictable.
Use redundant operations or canaries to detect and respond to faults.
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.
Detection
This weakness can be found using automated static analysis once a developer has indicated which code paths are critical to protect.
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.
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.