1992
Any writes to these reserve bits are blocked (e.g., ignored, access-protected, etc.), or an
exception can be asserted.
Demonstrative Examples
Example 1:
Assume a hardware Intellectual Property (IP) has address space 0x0-0x0F for its configuration
registers, with the last one labeled reserved (i.e. 0x0F). Therefore inside the Finite State Machine
(FSM), the code is as follows:
Example Language: Verilog (Bad)
reg gpio_out = 0; //gpio should remain low for normal operation
case (register_address)
4'b1111 : //0x0F
begin
gpio_out = 1;
end
An adversary may perform writes to reserved address space in hopes of changing the behavior of
the hardware. In the code above, the GPIO pin should remain low for normal operation. However,
it can be asserted by accessing the reserved address space (0x0F). This may be a concern if the
GPIO state is being used as an indicator of health (e.g. if asserted the hardware may respond
by shutting down or resetting the system, which may not be the correct action the system should
perform).
In the code below, the condition "register_address = 0X0F" is commented out, and a default
is provided that will catch any values of register_address not explicitly accounted for and take
no action with regards to gpio_out. This means that an attacker who is able to write 0X0F to
register_address will not enable any undocumented "features" in the process.
Example Language: Verilog (Good)
reg gpio_out = 0; //gpio should remain low for normal operation
case (register_address)
//4'b1111 : //0x0F
default: gpio_out = gpio_out;
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 1412 Comprehensive Categorization: Poor Coding Practices 1400 2538
Related Attack Patterns
CAPEC-ID Attack Pattern Name
121 Exploit Non-Production Interfaces
CWE-1220: Insufficient Granularity of Access Control
Weakness ID : 1220
Structure : Simple
Abstraction : Base
Description
CWE Version 4.14
CWE-1220: Insufficient Granularity of Access Control
CWE-1220: Insufficient Granularity of Access Control