CWE-1223

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
Race Condition for Write-Once Attributes

Description

A write-once register in hardware design is programmable by an untrusted software component earlier than the trusted software component, resulting in a race condition issue.

Implementation issues in hardware design of such controls can expose such registers to a race condition security flaw. For example, consider a hardware design that has two different software/firmware modules executing in parallel. One module is trusted (module A) and another is untrusted (module B). In this design, it could be possible for Module B to send write cycles to the write-once register before Module A. Since the field is write-once, the programmed value from Module A will be ignored and the pre-empted value programmed by Module B will be used by hardware.

Consequences

Access Control — Bypass Protection Mechanism

System configuration cannot be programmed in a secure way.

Mitigations

Phase: Architecture and Design

During hardware design, all register write-once or sticky fields must be evaluated for proper configuration.

Detection

Automated Analysis

The testing phase should use automated tools to test that values are not reprogrammable and that write-once fields lock on writing zeros.