This vulnerability occurs when a system's hardware registers, which act as a software-to-hardware control panel, lack proper access restrictions. Malicious or flawed software can directly manipulate these registers, leading to unauthorized changes in hardware behavior.
In modern System-on-Chip (SoC) and embedded designs, software controls hardware peripherals—like cryptographic engines or communication modules—through memory-mapped registers. Think of these registers as a set of front-panel switches and dials for the hardware. If any software component can freely access all registers without checks, it creates a direct path for attackers to tamper with security-critical operations. This improper gatekeeping can lead to a complete breach of system confidentiality and integrity. An attacker could, for example, reconfigure a secure element to leak encryption keys, disable a firewall, or alter boot sequences. Effectively, the hardware's security is only as strong as the software's ability to protect this vital control interface from unauthorized modification.
Impact: Read MemoryRead Application DataModify MemoryModify Application DataGain Privileges or Assume IdentityBypass Protection MechanismUnexpected StateAlter Execution Logic
Confidentiality of hardware assets may be violated if the protected information can be read out by software through the register interface. Registers storing security state, settings, other security-critical data may be corruptible by software without correctly implemented protections.
Cryptographic key material stored in registers inside the cryptographic accelerator can be accessed by software.
Key material stored in registers should never be accessible to software. Even if software can provide a key, all read-back paths to software should be disabled.
verilog
if ((riscv::priv_lvl_t'(priv_lvl_o & csr_addr.csr_decode.priv_lvl) != csr_addr.csr_decode.priv_lvl) && !(csr_addr.address==riscv::CSR_MEPC)) begin**
verilog
verilog
if ((riscv::priv_lvl_t'(priv_lvl_o & csr_addr.csr_decode.priv_lvl) != csr_addr.csr_decode.priv_lvl)) begin**
verilog