This vulnerability occurs when an untrusted software component wins a race condition and writes to a hardware register before the trusted component can, permanently locking in an insecure value because the register is designed to be written only once.
In hardware design, critical security settings are often stored in write-once registers. These registers allow software to set a value—like a system configuration or a security policy—a single time after a reset, after which they become read-only. This mechanism is intended to let trusted boot firmware establish a secure baseline that untrusted runtime software cannot later alter. A security flaw emerges when the hardware design does not properly sequence access to these registers. If an untrusted software module (Module B) can issue a write command before the trusted module (Module A) does, the untrusted value gets permanently locked in. The trusted module's subsequent write is ignored, leaving the system configured with potentially insecure or incorrect settings for its entire operational lifetime.
Impact: Bypass Protection Mechanism
System configuration cannot be programmed in a secure way.
module register_write_once_example (
verilogTrusted 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.