Segmentation Mechanism for Safe Untrusted Native Code Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing techniques for executing untrusted native code on computing devices face challenges in balancing security and performance, as they often rely on virtualization or interpretation, which can lead to security risks and performance disadvantages compared to direct native code execution.

Innovation Solution

A system that employs segmentation mechanisms to safely execute native code by limiting memory access, using a secure runtime environment with validation and moderation of resource access, ensuring data and control flow integrity, and utilizing hardware-supported segmented memory to isolate untrusted code modules.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If untrusted native code is executed directly on the native architecture, then execution performance is high, but security is compromised due to inability to prevent malicious code access

Engineering Contradiction:
Improveexecution performanceVSAvoidsecurity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent divides the memory space into distinct segments with different access permissions. A segmentation mechanism is introduced that creates isolated memory regions, allowing untrusted native code to execute in a confined segment while protecting other memory areas. This segmentation enables direct native code execution (maintaining performance) while preventing malicious code from accessing unauthorized memory regions (improving security).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a segmentation mechanism as an intermediary layer between the untrusted native code and the underlying memory system. This intermediary enforces access control policies by intercepting and validating memory access requests, allowing legitimate accesses while blocking malicious ones. The segmentation mechanism acts as a mediator that preserves execution performance while ensuring security through controlled access to memory resources.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If virtual machine execution environments are used to isolate untrusted applications, then security is improved, but execution performance deteriorates compared to native code

Engineering Contradiction:
ImprovesecurityVSAvoidexecution performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Instead of using a full virtual machine environment, the patent employs a lightweight segmentation mechanism that divides memory into protected segments. This approach provides isolation (security) without the overhead of virtual machine emulation, allowing native code to execute directly at hardware speed while confined to its designated memory segment.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts only the essential isolation functionality from virtual machine environments, implementing a standalone segmentation mechanism that provides memory protection without the complete virtualization infrastructure. This extraction maintains security benefits while eliminating performance penalties associated with full virtual machine execution.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If interpreted languages are used to execute untrusted code, then security is improved through limited operation capabilities, but execution performance deteriorates significantly

Engineering Contradiction:
ImprovesecurityVSAvoidexecution performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent uses segmentation to provide security constraints without interpreting code. By dividing memory into protected segments with controlled access, untrusted native code can execute directly with full native performance while the segmentation mechanism enforces security policies, eliminating the performance overhead of interpretation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent replaces the mechanical interpretation process with a hardware-supported segmentation mechanism. Instead of interpreting and validating each operation, the segmentation mechanism uses hardware-enforced memory protection to constrain code behavior, allowing direct native execution while maintaining security through architectural support rather than software interpretation.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS8136158B1User-level segmentation mechanism that facilitates safely executing untrusted native code
Publication Date: 2012.03.13 GOOGLE LLC
  • US8136158B1 patent drawing
  • US8136158B1 patent drawing
  • US8136158B1 patent drawing

AI summary

A system that uses segmentation to safely execute native code. This system includes a processing element that executes the native code and a memory which stores code and data for the processing element. The processing element includes a segmentation mechanism which limits the native code executing on the processing element to accessing a specified segment of memory. The processing element also includes an instruction-processing unit, which is configured to execute a user-level instruction that causes the segmentation mechanism to limit memory accesses by the native code to the specified segment of the memory.