Guest Code Loading Security via Hypervisor Memory Buffer Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtual environments, ensuring secure and efficient code loading for guest operating systems within virtual machines is challenging due to the lack of effective mechanisms for verifying digital signatures and managing memory permissions, which can lead to tampering and execution of compromised code modules.

Innovation Solution

A method and system for code loading in a virtual environment that involves verifying digital signatures, applying relocations, and managing memory permissions through a guest loader and hypervisor interactions, ensuring secure execution by setting memory buffers to write-protect and executable modes based on content verification.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the guest operating system directly loads and executes code modules from memory buffers, then the code loading process is simple and fast, but the system is vulnerable to tampering and execution of compromised code

Engineering Contradiction:
Improvecode integrityVSAvoidcode loading mechanism
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces a hypervisor as an intermediary layer between the guest operating system and the code modules. The hypervisor verifies digital signatures of code modules and manages memory buffer permissions, preventing direct execution of unverified code by the guest OS while maintaining a relatively simple loading process for authorized code.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements preliminary verification of digital signatures and setting of memory permissions before code execution. The hypervisor verifies the authenticity of code modules and configures memory buffers as read-only or executable before the guest OS loads and executes the code, preventing tampering during the loading process.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If memory buffers are kept writable during code loading, then code modules can be flexibly loaded and modified, but the risk of unauthorized modifications and security breaches increases

Engineering Contradiction:
ImprovesecurityVSAvoidcode loading flexibility
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent dynamically changes memory buffer permissions during the code loading process. The hypervisor initially sets buffers as writable to allow code loading, then transitions them to read-only or executable states after verification, providing both flexibility during loading and security during execution.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the memory protection parameters of buffers at different stages of code loading. The hypervisor adjusts permission bits from writable to read-only or executable based on the verification status and execution requirements, balancing operational flexibility with security requirements.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If digital signature verification is performed for every code module, then code authenticity is ensured, but the code loading process becomes time-consuming

Engineering Contradiction:
Improvecode authenticityVSAvoidcode loading speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs digital signature verification as a preliminary step before code execution. The hypervisor verifies the authenticity of code modules in advance, caching the verification results so that subsequent loading of the same code modules does not require repeated verification, thus ensuring authenticity while improving loading speed.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10630484B2Securing code loading by a guest in a virtual environment
Publication Date: 2020.04.21 RED HAT ISRAEL
  • US10630484B2 patent drawing
  • US10630484B2 patent drawing
  • US10630484B2 patent drawing

AI summary

Methods, systems, and computer program products are included for loading a code module. A method includes verifying, by a guest, a digital signature of a code module stored in an initial guest memory buffer. The guest copies the verified code module stored at the initial guest memory buffer into a target guest memory buffer and applies, using one or more symbol entries, one or more relocations to the verified code module stored at the target guest memory buffer. The guest sends a request to a hypervisor to set the target guest memory buffer to a write-protect mode. In response to a determination that first content stored in the initial guest memory buffer corresponds to second content stored in the target guest memory buffer, the guest sends a request to the hypervisor to set the target guest memory buffer to an executable mode.