2003
Write_once_status <= 1'b1; // Write once status set after first write.
end
else if (~write)
begin
Data_out[15:1] <= Data_out[15:1];
Data_out[0] <= Write_once_status;
end
endmodule
The first system component that sends a write cycle to this register can program the value. This
could result in a race condition security issue in the SoC design, if an untrusted agent is running in
the system in parallel with the trusted component that is expected to program the register.
Example Language: (Good)
Trusted firmware or software trying to set the write-once field:
• Must confirm the Write_once_status (bit 0) value is zero, before programming register. If another agent has
programmed the register before, then Write_once_status value will be one.
• After writing to the register, the trusted software can issue a read to confirm that the valid setting has been
programmed.
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 1199 General Circuit and Logic Design Concerns 1194 2471
MemberOf 1401 Comprehensive Categorization: Concurrency 1400 2526
Related Attack Patterns
CAPEC-ID Attack Pattern Name
26 Leveraging Race Conditions
CWE-1224: Improper Restriction of Write-Once Bit Fields
Weakness ID : 1224
Structure : Simple
Abstraction : Base
Description
The hardware design control register "sticky bits" or write-once bit fields are improperly
implemented, such that they can be reprogrammed by software.
Extended Description
Integrated circuits and hardware IP software programmable controls and settings are commonly
stored in register circuits. These register contents have to be initialized at hardware reset to
define default values that are hard coded in the hardware description language (HDL) code of
the hardware unit. A common security protection method used to protect register settings from
modification by software is to make the settings write-once or "sticky." This allows writing to such
registers only once, whereupon they become read-only. This is useful to allow initial boot software
to configure systems settings to secure values while blocking runtime software from modifying such
hardware settings.
CWE Version 4.14
CWE-1224: Improper Restriction of Write-Once Bit Fields
CWE-1224: Improper Restriction of Write-Once Bit Fields