Memory Management Unit Protection Key Enforcement
Solution Overview
Problem
Existing memory protection mechanisms fail to effectively prevent untrusted applications from modifying protection key rights (PKRs) and accessing unauthorized memory pages, leading to potential security breaches and attacks.
Innovation Solution
Implementing a sandbox execution environment with a memory management unit that includes PKR registers and update masks, which restrict access to specific memory pages and require higher-level permissions for updates, along with trusted PKR update pages to ensure secure execution of untrusted applications.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If memory protection mechanisms are implemented to prevent stray accesses, then security against unauthorized memory access is improved, but device complexity increases due to additional protection layers
Solution Approach 1:
The patent divides memory into multiple protection domains using protection keys (PKs), where each domain has its own access rights stored in PKR registers. This segmentation allows fine-grained control over memory access without requiring a completely complex protection system, as each domain can be independently managed with standardized protection mechanisms.
Solution Approach 2:
The patent introduces protection key registers (PKRs) and update masks as intermediary structures that mediate between application programs and memory pages. These intermediaries enforce access rights without requiring direct complex validation logic in every memory access path, simplifying the overall protection mechanism while maintaining security.
2Ease of operation
If application programs are allowed to update protection key rights freely, then ease of operation is improved, but security deteriorates due to potential unauthorized modifications
Solution Approach 1:
The patent applies different access control qualities to different memory regions through protection keys. Each protection domain can have customized update permissions (read-only, read-write, execute) tailored to its specific security requirements, allowing sensitive areas to be protected while permitting updates in less critical regions.
Solution Approach 2:
The patent prevents unauthorized PKR modifications by establishing protection rules in advance through the memory management unit. Before any PKR update can occur, the MMU checks whether the accessing protection domain has the appropriate update permission, blocking potentially harmful modifications before they can affect system security.
3Reliability
If stricter access control is implemented to prevent protection key rights attacks, then security is improved, but productivity decreases due to additional access validation overhead
Solution Approach 1:
The patent pre-configures protection key rights and update permissions during memory initialization and domain setup. The memory management unit caches access rights information, allowing rapid validation of memory access requests without performing complex security checks for every individual access, thus reducing overhead while maintaining security.
Solution Approach 2:
The protection key mechanism enables self-validating memory access where the MMU automatically checks access rights against stored PKR entries without requiring intervention from the application program or operating system. This automated enforcement reduces the productivity overhead associated with manual security management while ensuring consistent security policy application.
Data Source
AI summary
Enforcing memory operand types using protection keys is generally described herein. A processor system to provide sandbox execution support for protection key rights attacks includes a processor core to execute a task associated with an untrusted application and execute the task using a designated page of a memory; and a memory management unit to designate the page of the memory to support execution of the untrusted application.


