VM Privilege Levels Control Kernel Memory Write Access

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Device drivers running in virtual machines can access critical kernel infrastructure, leading to vulnerabilities and potential system crashes due to lack of rigorous testing, necessitating a method to control unauthorized access to kernel memory.

Innovation Solution

Utilizing virtual machine privilege levels (VMPLs) to partition guest memory and restrict permissions, where untrusted device drivers are executed with limited permissions, and the hypervisor determines the allowability of write operations to kernel memory through a trusted code base, ensuring only authorized access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If device drivers are allowed full access to kernel memory, then device driver functionality is improved, but system security deteriorates due to vulnerabilities and unauthorized access

Engineering Contradiction:
Improvedevice driver functionalityVSAvoidunauthorized access to kernel memory
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The patent segments kernel memory access rights by introducing multiple virtual machine privilege levels (VMPLs). Each VMPL is associated with specific memory regions and access permissions, allowing device drivers to access only the kernel memory regions necessary for their function while preventing access to critical infrastructure. This segmentation resolves the contradiction by enabling selective functionality while blocking harmful access.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by assigning different privilege levels and access permissions to different regions of kernel memory. Critical kernel infrastructure regions are protected with higher privilege requirements, while device driver accessible regions have appropriate but limited permissions. This localized differentiation allows device drivers to function where needed while maintaining security in critical areas.

Inventive Principle:
Principle #3Local quality

2Object-affected harmful factors

If device drivers are executed with limited permissions, then system security is improved, but device driver functionality deteriorates due to restricted access

Engineering Contradiction:
Improvesecurity risks and kernel crashesVSAvoiddevice driver functionality
Core Design Contradiction:
Object-affected harmful factorsVSAdaptability or versatility

Solution Approach 1:

The patent segments kernel memory into different regions with different privilege levels, allowing device drivers to be executed with limited permissions for non-critical regions while maintaining the ability to access critical regions when absolutely necessary through controlled mechanisms. This resolves the contradiction by providing functional limitations that enhance security without completely disabling device driver capabilities.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces the hypervisor as an intermediary between device drivers and kernel memory. The hypervisor mediates access requests, validating whether a device driver with limited permissions can safely access a particular memory region. This intermediary mechanism allows security-restricted access to be managed dynamically, enabling functionality where safe while blocking harmful access.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Object-affected harmful factors

If guest memory is partitioned to control access, then unauthorized access is prevented, but device complexity increases due to additional permission management

Engineering Contradiction:
Improveunauthorized access to kernel memoryVSAvoidpermission management structure
Core Design Contradiction:
Object-affected harmful factorsVSDevice complexity

Solution Approach 1:

The patent makes the privilege level mechanism universal by implementing it at the hardware level through existing processor support for multiple privilege levels. This multi-functional approach serves both security purposes (preventing unauthorized access) and performance purposes (enabling efficient memory access control) without requiring entirely new complex software-based permission systems. The hardware-level implementation reduces overall system complexity despite adding permission management capabilities.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS20240362049A1Using virtual machine privilege levels to control write access to kernel memory in a virtual machine
Publication Date: 2024.10.31 RED HAT INC
  • US20240362049A1 patent drawing
  • US20240362049A1 patent drawing
  • US20240362049A1 patent drawing

AI summary

Write access to kernel memory in a virtual machine (VM) can be controlled using virtual machine privilege levels (VMPLs). In one example, a guest kernel can detect an attempt by a device driver to perform a write operation using a first virtual central processing unit (vCPU) with a first VMPL. The write operation can correspond to a particular kernel memory address for the guest kernel, and the first VMPL may have fewer permissions than a second VMPL. In response to detecting the write operation, the guest kernel can exit to a hypervisor associated with the guest kernel based on the first VMPL. In response, the hypervisor can launch a second vCPU with the second VMPL. The second vCPU can determine that a range of kernel memory for the guest kernel does not comprise the particular kernel memory address. In response, the device driver, using the first vCPU, can execute the write operation.