Hypervisor Memory Permission Enforcement for Kernel Code Protection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing technologies, such as SMAP and SMEP, are not universally available and may allow kernel access or execution of application code through alternate memory mapping, posing security risks in protecting application code from kernel mode execution.
Innovation Solution
A method and system that utilize a hypervisor to detect allocated physical memory pages for an application and request setting these pages to an executable-by-user mode in the hypervisor's page tables, preventing kernel mode execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If SMAP or SMEP technologies are used to prevent kernel mode execution of application code, then application code execution during kernel mode is blocked, but these technologies are not universally available and may allow kernel access through alternate memory mapping
Solution Approach 1:
The patent introduces a hypervisor as an intermediary layer between the application code and the kernel mode execution environment. The hypervisor intercepts memory access requests and enforces execution permissions, preventing kernel mode execution of application code without requiring hardware-specific features like SMAP or SMEP. This mediator approach achieves reliable code protection while maintaining broad hardware compatibility.
2Reliability
If kernel mode execution of application code is prevented through hardware features, then security is improved, but device complexity increases due to reliance on specific hardware capabilities
Solution Approach 1:
The hypervisor serves as a software-based intermediary that implements security policies without relying on hardware-specific features. By managing memory permissions and intercepting execution requests at the virtualization layer, the system achieves high security while avoiding the complexity of hardware feature dependencies.
Solution Approach 2:
The patent replaces hardware-based security mechanisms (SMAP/SMEP) with a software-based hypervisor implementation. This substitution eliminates the need for specific hardware capabilities, reducing device complexity and hardware dependency while maintaining or enhancing security through software-controlled memory permission management.
3Object-affected harmful factors
If application code is protected from kernel mode execution, then malicious code execution is prevented, but the system requires additional layers of protection increasing complexity
Solution Approach 1:
The hypervisor acts as a single comprehensive intermediary that consolidates multiple protection functions into one layer. It manages memory permissions, intercepts execution requests, and enforces security policies, replacing the need for multiple separate protection mechanisms and reducing overall system complexity while effectively preventing malicious code execution.
Data Source
AI summary
Systems and methods are disclosed for securing an application running on a guest. An example method includes detecting, by a guest running on a virtual machine, that a set of physical memory pages is allocated to an application. The virtual machine runs on a hypervisor, and the application runs on the guest. During runtime, the guest may send a request to the hypervisor to set the set of physical memory pages to an executable-by-user mode in the hypervisor's page tables.


