Randomized Heap Allocation for Use-After-Free Defense
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
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
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.
Data Source
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.

