Description
The product defines a large address region protected from modification by the same register lock control bit. This results in a conflict between the functional requirement that some addresses need to be writable by software during operation and the security requirement that the system configuration lock bit must be set during the boot process.
Integrated circuits and hardware IPs can expose the device configuration controls that need to be programmed after device power reset by a trusted firmware or software module (commonly set by BIOS/bootloader) and then locked from any further modification. In hardware design, this is commonly implemented using a programmable lock bit which enables/disables writing to a protected set of registers or address regions. When the programmable lock bit is set, the relevant address region can be implemented as a hardcoded value in hardware logic that cannot be changed later. A problem can arise wherein the protected region definition is not granular enough. After the programmable lock bit has been set, then this new functionality cannot be implemented without change to the hardware design.
Potential Impact
Access Control
Other
Demonstrative Examples
Address
Register
0x0000
SYS_LOCK: 32 bit system configuration lock register, each bit is write-1-once
0x0004
SECURITY_FEATURE_ENABLE: 32 bit register controlling enabling of security features
...
0x0310
SW_MODE: 32 bit Software Mode indication register
Address region
Lock bit
0x0000 - 0x03FF
SYS_LOCK[0]
0x0400 - 0x07FF
SYS_LOCK[1]
...
0x7C00 - 0x7FFF
SYS_LOCK[31]Mitigations & Prevention
The defining of protected locked registers should be reviewed or tested early in the design phase with software teams to ensure software flows are not blocked by the security locks. As an alternative to using register lock control bits and fixed access control regions, the hardware design could use programmable security access control configuration so that device trusted firmware can configure and change the protected regions based on software usage and security models.
Related Weaknesses
Frequently Asked Questions
What is CWE-1222?
CWE-1222 (Insufficient Granularity of Address Regions Protected by Register Locks) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The product defines a large address region protected from modification by the same register lock control bit. This results in a conflict between the functional requirement that some addresses need to...
How can CWE-1222 be exploited?
Attackers can exploit CWE-1222 (Insufficient Granularity of Address Regions Protected by Register Locks) to other. This weakness is typically introduced during the Architecture and Design phase of software development.
How do I prevent CWE-1222?
Key mitigations include: The defining of protected locked registers should be reviewed or tested early in the design phase with software teams to ensure software flows are not blocked by the security locks.
What is the severity of CWE-1222?
CWE-1222 is classified as a Variant-level weakness (Low-Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.