ハードウェア設計におけるエイリアスまたはミラー化されたメモリ領域は、ハードウェアによって強制される読み取り/書き込み許可に一貫性がない可能性があります。その結果、信頼されていないエージェントはメモリ領域へのアクセスをブロックされるが、対応するエイリアスされたメモリ領域へのアクセスはブロックされないという可能性がある。
ハードウェア製品の設計では、特権ソフトウェアが隔離されたメモリ領域とアクセス制御(読み取り/書き込み)ポリシーを定義できるようにするメモリ保護機能を実装する必要があることがよくあります。隔離されたメモリ領域は、デザイン内の異なるメモリ空間(システム物理アドレス、仮想アドレス、メモリ・マップドIOなど)に定義することができます。
各メモリ・セルはマッピングされ、コア・ソフトウェアがそのメモリへの読み書きに使用できるシステム・アドレスが割り当てられる必要があります。同じメモリ・セルを複数のシステム・アドレスにマッピングすることは可能であり、エイリアスされたシステム・アドレスのいずれに対してもリード/ライトが同じメモリ・セルにデコードされる。
これは、冗長性とアドレス・デコーディング・ロジックの簡素化のために、ハードウェア設計で一般的に行われています。一方のメモリ領域が破損または故障した場合、そのハードウェアはミラー化されたメモリ領域のデータを使用するように切り替えることができます。アドレス・デコーダー・ユニットが、より小さいアドレス領域を完全なシステム・アドレスにマッピングする際に高次アドレス・ビットを無視する場合、システム・アドレス・マップにメモリ・エイリアスを作成することもできる。
このようなメモリ・マッピングに存在し得る一般的なセキュリティ上の弱点は、エイリアスされたメモリ領域が、ハードウェアによって異なるリード/ライト・アクセス保護を強制され、信頼できないエージェントがメモリ・アドレスにアクセスすることはブロックされるが、対応するエイリアスされたメモリ・アドレスにアクセスすることはブロックされないことです。このような矛盾を利用して、プライマリ・メモリ・ブロックのアクセス保護をバイパスし、保護されたメモリを読み取ったり変更したりすることができます。
信頼されていないエージェントがアドレス領域のマッピングを変更したり、メモリ領域のサイズを変更したりできる場合、悪意のある目的でシステム・アドレス・マップにメモリ・エイリアスを作成する可能性もあります。
Aliased or mirrored memory regions in hardware designs may have inconsistent read/write permissions enforced by the hardware. A possible result is that an untrusted agent is blocked from accessing a memory region but is not blocked from accessing the corresponding aliased memory region.
Hardware product designs often need to implement memory protection features that enable privileged software to define isolated memory regions and access control (read/write) policies. Isolated memory regions can be defined on different memory spaces in a design (e.g. system physical address, virtual address, memory mapped IO).
Each memory cell should be mapped and assigned a system address that the core software can use to read/write to that memory. It is possible to map the same memory cell to multiple system addresses such that read/write to any of the aliased system addresses would be decoded to the same memory cell.
This is commonly done in hardware designs for redundancy and simplifying address decoding logic. If one of the memory regions is corrupted or faulty, then that hardware can switch to using the data in the mirrored memory region. Memory aliases can also be created in the system address map if the address decoder unit ignores higher order address bits when mapping a smaller address region into the full system address.
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.