CWE-1257

Base Abstraction Level
Pillar — Highest-level weakness category
Class — Abstract, language-independent
Base — Specific enough to detect
Variant — Tied to specific technology
Compound — Requires multiple weaknesses
Incomplete MITRE CWE Status
Stable — Fully reviewed and complete
Draft — Under development, may change
Incomplete — Partially defined by MITRE
Deprecated — No longer recommended
Obsolete — Replaced by another CWE
Improper Access Control Applied to Mirrored or Aliased Memory Regions

Description

Aliased or mirrored memory regions in hardware designs may have inconsistent read/write permissions enforced by the hardware.

A common security weakness that can exist in such memory mapping is that aliased memory regions could have different read/write access protections enforced by the hardware such that an untrusted agent is blocked from accessing a memory address but is not blocked from accessing the corresponding aliased memory address. Such inconsistency can then be used to bypass the access protection of the primary memory block and read or modify the protected memory. An untrusted agent could also possibly create memory aliases in the system address map for malicious purposes if it is able to change the mapping of an address region or modify memory region sizes.

Consequences

Confidentiality — Read Memory

An untrusted agent might be blocked from accessing a memory region, but it is not blocked from accessing the corresponding aliased memory region.

Integrity — Modify Memory

An untrusted agent might be blocked from accessing a memory region, but it is not blocked from accessing the corresponding aliased memory region.

Availability — DoS: Instability

Mitigations

Phase: Architecture and Design, Implementation

The checks should be applied for consistency access rights between primary memory regions and any mirrored or aliased memory regions. If different memory protection units (MPU) are protecting the aliased regions, their protected range definitions and policies should be synchronized.

Phase: Architecture and Design, Implementation

The controls that allow enabling memory aliases or changing the size of mapped memory regions should only be programmable by trusted software components.