Description
The product allows address regions to overlap, which can result in the bypassing of intended memory protection.
Isolated memory regions and access control (read/write) policies are used by hardware to protect privileged software. Software components are often allowed to change or remap memory region definitions in order to enable flexible and dynamically changeable memory management by system software. If a software component running at lower privilege can program a memory address region to overlap with other memory regions used by software running at higher privilege, privilege escalation may be available to attackers. The memory protection unit (MPU) logic can incorrectly handle such an address overlap and allow the lower-privilege software to read or write into the protected memory region, resulting in privilege escalation attack. An address overlap weakness can also be used to launch a denial of service attack on the higher-privilege software memory regions.
Potential Impact
Confidentiality, Integrity, Availability
Modify Memory, Read Memory, DoS: Instability
Demonstrative Examples
Non_privileged_SW can program the Address_range register for Region_2 so that its address overlaps with the ranges defined by Region_0 or Region_1. Using this capability, it is possible for Non_privileged_SW to block any memory region from being accessed by Privileged_SW, i.e., Region_0 and Region_1.Ensure that software accesses to memory regions are only permitted if all three filters permit access. Additionally, the scheme could define a memory region priority to ensure that Region_2 (the memory region defined by Non_privileged_SW) cannot overlap Region_0 or Region_1 (which are used by Privileged_SW)....
localparam logic[63:0] PLICLength = 64'h03FF_FFFF;
localparam logic[63:0] UARTLength = 64'h0011_1000;
localparam logic[63:0] AESLength = 64'h0000_1000;
localparam logic[63:0] SPILength = 64'h0080_0000;
...
typedef enum logic [63:0] {
...
PLICBase = 64'h0C00_0000,
UARTBase = 64'h1000_0000,
AESBase = 64'h1010_0000,
SPIBase = 64'h2000_0000,
......
localparam logic[63:0] PLICLength = 64'h03FF_FFFF;
localparam logic[63:0] UARTLength = 64'h0000_1000;
localparam logic[63:0] AESLength = 64'h0000_1000;
localparam logic[63:0] SPILength = 64'h0080_0000;
...
typedef enum logic [63:0] {
...
PLICBase = 64'h0C00_0000,
UARTBase = 64'h1000_0000,
AESBase = 64'h1010_0000,
SPIBase = 64'h2000_0000,
...Mitigations & Prevention
Ensure that memory regions are isolated as intended and that access control (read/write) policies are used by hardware to protect privileged software.
For all of the programmable memory protection regions, the memory protection unit (MPU) design can define a priority scheme. For example: if three memory regions can be programmed (Region_0, Region_1, and Region_2), the design can enforce a priority scheme, such that, if a system address is within multiple regions, then the region with the lowest ID takes priority and the access-control policy of that region will be applied. In some MPU designs, the priority scheme can also b
Detection Methods
- Manual Analysis High — Create a high privilege memory block of any arbitrary size. Attempt to create a lower privilege memory block with an overlap of the high privilege memory block. If the creation attempt works, fix the hardware. Repeat the test.
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2008-7096 | virtualization product allows compromise of hardware product by accessing certain remapping registers. |
| [REF-1100] | processor design flaw allows ring 0 code to access more privileged rings by causing a register window to overlap a range of protected system RAM [REF-1100] |
Related Weaknesses
Frequently Asked Questions
What is CWE-1260?
CWE-1260 (Improper Handling of Overlap Between Protected Memory Ranges) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product allows address regions to overlap, which can result in the bypassing of intended memory protection.
How can CWE-1260 be exploited?
Attackers can exploit CWE-1260 (Improper Handling of Overlap Between Protected Memory Ranges) to modify memory, read memory, dos: instability. This weakness is typically introduced during the Architecture and Design, Implementation phase of software development.
How do I prevent CWE-1260?
Key mitigations include: Ensure that memory regions are isolated as intended and that access control (read/write) policies are used by hardware to protect privileged software.
What is the severity of CWE-1260?
CWE-1260 is classified as a Base-level weakness (Medium abstraction). It has been observed in 2 real-world CVEs.