CWE-1461

Base Abstraction Level
Pillar — Highest-level weakness category
Class — Abstract, language-independent
Base — Specific enough to detect
Variant — Tied to specific technology
Compound — Requires multiple weaknesses
Incomplete MITRE CWE Status
Stable — Fully reviewed and complete
Draft — Under development, may change
Incomplete — Partially defined by MITRE
Deprecated — No longer recommended
Obsolete — Replaced by another CWE
Hardware Simulation / Synthesis Mismatch

Description

The hardware design contains structures that are interpreted differently during synthesis than during simulation, which cause inconsistencies in security-relevant behavior between the synthesized implementation and the simulation.

Hardware-description-language (HDL) code describes functionality which can be verified as correct using simulation tools. Synthesis tools then (automatically) convert this into a physically-realizable representation. Certain HDL code structures cannot be exactly represented, or have multiple valid representations from which the synthesis tool must choose. This can result in output which behaves differently to the (functionally-correct) HDL code. These "simulation/synthesis mismatches" may have security consequences.

Consequences

Other — Varies by Context

Mitigations

Phase:

Establish and enforce HDL coding and review practices that minimize differences between simulation semantics and synthesis interpretation. Avoid HDL constructs, synthesis directives, and tool-dependent behaviors known to cause simulation/synthesis mismatch, with particular attention to security-relevant logic.

Phase:

For security-critical logic, preserve intentional redundancy that is required for security. Examples may include redundant logic, triple modular redundancy (TMR) structures, Hamming-distance state encodings, or state-machine recovery logic. Use synthesis constraints, preservation attributes, carefully controlled structural implementation, or manual implementation of selected critical blocks to prevent this redundancy from being merged, re-encoded, or optimized away.

Detection

Automated Static Analysis - Source Code

HDL linting, rule-based static analysis, and HDL checker tools can examine source code for structures that may be interpreted differently by simulation and synthesis tools. They may identify synthesis-sensitive coding patterns associated with this weakness.

Manual Analysis

Synthesis warning review can examine synthesis logs and reports for tool messages associated with possible simulation/synthesis mismatch. It may identify ignored constructs, unsupported HDL semantics, synthesis assumptions, or optimizations that could affect security-relevant behavior.

Formal Verification

HDL-source-to-netlist formal equivalence checking can examine the simulated model and synthesized netlist for behavioral mismatch associated with this weakness. It may identify non-equivalent outputs, failed compare-points, state-mapping issues, or counterexamples under the checked constraints.

Simulation / Emulation

Cross-simulation across HDL-source and post-synthesis models can examine both abstraction levels for observable behavioral divergence associated with this weakness. It may identify mismatches when security-relevant behaviors are explicitly exercised.

Fuzzing

Coverage-guided differential fuzzing can examine HDL source code and synthesized implementation models for behavioral divergence associated with this weakness. It may identify generated inputs or state conditions that expose synthesis-induced mismatches.