Randomized Heap Allocation for Use-After-Free Defense

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing defenses against use-after-free (UAF) attacks, such as heap partitioning, become cumbersome and inefficient due to the large number of heaps required, leading to complex management and high overhead, making it difficult to effectively combat these attacks.

Innovation Solution

Randomized heap allocation and partitioning, where object types are randomly assigned to heaps at runtime, minimizing the number of heaps needed and denying attackers knowledge of object associations, thereby enhancing security.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If heap partitioning is used to defend against use-after-free attacks, then security is improved, but device complexity and management overhead increase significantly

Engineering Contradiction:
ImprovesecurityVSAvoidheap management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies dynamics by randomizing heap allocation at runtime rather than using static partitioning. The heap manager dynamically assigns objects to heaps based on randomized decisions during execution, allowing the system to maintain security while adapting to different allocation patterns without requiring pre-defined heap structures for each object type.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent implements universality by creating a single heap manager that handles all object types through randomized allocation. Instead of requiring separate heap managers for each object type (as in traditional partitioning), one universal heap manager performs multiple functions including security enforcement, memory allocation, and randomization, thereby reducing overall system complexity.

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

2Reliability

If traditional heap partitioning is implemented for each object type, then attack prevention is improved, but productivity and execution speed decrease due to overhead

Engineering Contradiction:
Improveattack preventionVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The randomized heap allocation uses dynamic decision-making at runtime to determine heap assignment, replacing static partitioning lookups. This dynamic approach reduces the overhead of managing multiple fixed heaps while maintaining security, as the randomization can be implemented with simple hash functions or bit manipulation rather than complex partitioning logic.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter of heap assignment from deterministic (based on object type) to probabilistic (randomized). By modifying this parameter, the system achieves similar security goals without the performance penalty of managing numerous fixed partitions, as randomization can be computed more efficiently than maintaining and querying multiple heap structures.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If multiple heaps are created for different object types, then security against UAF attacks is improved, but loss of time increases due to complex heap management

Engineering Contradiction:
ImprovesecurityVSAvoidheap management time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system uses dynamic randomization during heap allocation to determine object placement, eliminating the need for time-consuming lookups and management operations associated with static partitioning. The randomized approach allows for faster allocation decisions while maintaining security boundaries through runtime enforcement rather than pre-computed partitions.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10528737B2Randomized heap allocation
Publication Date: 2020.01.07 TREND MICRO INC
  • US10528737B2 patent drawing
  • US10528737B2 patent drawing

AI summary

Examples relate to randomized heap allocation. One example enables creating a set of heaps for an application; allocating an array for the application, wherein the application comprises a set of object types, the array comprises a set of elements, and each element of the array is associated with a unique object type of the set of object types; and initializing the array by: iterating over the array to associate each element of the array with a randomly chosen heap of the set of heaps.