Memory Privilege Segmentation for JIT Spray Mitigation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current software systems are vulnerable to attacks, such as JIT spray attacks, due to the lack of refined privilege control in writable and executable memory regions, which allows attackers to execute malicious code with the same privilege level as legitimate processes, leading to potential data leakage and system compromise.

Innovation Solution

A method that dynamically allocates memory with a second type of privilege different from the initial process privilege, allowing the kernel to manage and control access rights within the memory region, thereby isolating and limiting the impact of malicious code execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If memory is allocated with the same privilege level as the process, then the process can execute code freely, but attackers can execute malicious code with the same privilege level leading to system compromise

Engineering Contradiction:
ImprovesecurityVSAvoidprivilege flexibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent segments memory into distinct regions with different privilege levels. Specifically, it creates a first memory region with a first privilege level for storing original process code and a second memory region with a second (higher) privilege level for storing dynamically generated code. This segmentation allows the system to maintain both security (by isolating malicious code potential) and adaptability (by allowing legitimate dynamic code generation with appropriate privileges).

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by assigning different privilege characteristics to different memory regions. The first memory region has restricted privilege characteristics suitable for running authenticated process code, while the second memory region has elevated privilege characteristics necessary for dynamic code generation and execution. This local differentiation resolves the contradiction by providing appropriate privileges only where needed rather than uniformly across all memory.

Inventive Principle:
Principle #3Local quality

2Reliability

If the kernel dynamically allocates memory with different privilege levels, then attack impact is limited, but memory management complexity increases

Engineering Contradiction:
Improveattack mitigationVSAvoidmemory management
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary mechanism in the form of a just-in-time (JIT) compiler that acts as a mediator between the process and the kernel's memory allocation system. The JIT compiler handles the complexity of dynamic memory allocation and privilege assignment, translating high-level code generation needs into specific kernel memory allocation requests. This intermediary absorbs much of the management complexity, making the system more manageable while maintaining strong attack mitigation capabilities.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements dynamic memory allocation where memory regions and their privilege levels are created on-demand rather than being statically predefined. The kernel dynamically allocates memory regions with appropriate privilege levels based on the specific needs of the process at runtime. This dynamic approach allows the system to adapt to different security requirements without requiring complex static configuration, thereby reducing overall system complexity while maintaining strong security.

Inventive Principle:
Principle #15Dynamics

3Adaptability or versatility

If writable and executable memory regions are created, then code can be generated dynamically, but attackers can exploit these regions to inject malicious code

Engineering Contradiction:
Improvedynamic code generationVSAvoidcode injection vulnerability
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The patent applies preliminary anti-action by pre-establishing privileged memory regions with restricted access controls before any dynamic code generation occurs. The kernel pre-allocates a second memory region with elevated privileges and creates an execution environment that is isolated from the main process space. This preliminary setup prevents attackers from injecting malicious code into unprotected memory regions, as the memory architecture is already segmented and protected before exploitation attempts can occur.

Inventive Principle:
Principle #9Preliminary anti-action

Solution Approach 2:

The patent uses copying by creating isolated copies of the execution environment in a separate privileged memory region. Instead of allowing direct modification of the process's main memory space, the system copies necessary code and data into a controlled second memory region with different privilege characteristics. This copying mechanism enables dynamic code generation while preventing attackers from exploiting the original process memory space, as malicious code would need to successfully infiltrate the isolated copied environment first.

Inventive Principle:
Principle #26Copying

Data Source

PatentEP3191943B1Memory privilege of a computing system
Publication Date: 2022.08.17 IRDETO BV
  • EP3191943B1 patent drawingFigure 1
  • EP3191943B1 patent drawingFigure 2

AI summary

A method for executing a process on a device, the device comprising one or more processors for executing the process and a memory, wherein the process has an associated first type of privilege, the method comprising: obtaining a portion of the memory for use by the process or for use by a further process being created by the process, wherein the portion of the memory is identified as both writable and executable memory, wherein the portion of the memory has an associated second type of privilege that is different from the first type of privilege.