Type-Specific Memory Heap Segmentation for Use-After-Free Mitigation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional memory heaps are vulnerable to use-after-free exploits, where an attacker can access memory after it has been freed, leading to potential control of a target system.
Innovation Solution
Implementing isolated type-specific memory heaps, where objects of a single data type are stored in separate memory heaps, with allocators and deallocators specific to each data type, generated at compile time, to prevent mixing of memory allocations and exploit attacks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of energy
If a conventional shared memory heap is used for dynamic allocation, then memory utilization is improved through reuse of freed blocks, but security deteriorates due to vulnerability to use-after-free exploits
Solution Approach 1:
The patent divides the conventional shared memory heap into multiple isolated type-specific heaps, where each heap is dedicated to storing objects of a specific data type. This segmentation prevents an attacker from exploiting use-after-free vulnerabilities across different data types, as freed memory in one type-specific heap cannot be allocated to objects of different types. The segmentation maintains memory utilization through reuse while eliminating the security vulnerability by enforcing type isolation.
2Reliability
If type-specific memory heaps are implemented to prevent use-after-free exploits, then security is improved, but device complexity increases due to multiple separate heap instances
Solution Approach 1:
The patent implements a universal heap management system that can service multiple type-specific heaps through a common interface. The heap manager is designed to handle allocation, deallocation, and memory reuse operations across all type-specific heaps uniformly, abstracting away the complexity of managing multiple separate heaps. This universal approach maintains security through type isolation while preventing the system complexity from escalating, as the underlying management mechanisms remain consistent across different heap types.
3Productivity
If memory blocks are reused after deallocation in a conventional heap, then productivity is improved through efficient memory management, but reliability deteriorates due to potential exploitation of freed memory
Solution Approach 1:
The patent applies local quality by making each memory block's reuse behavior dependent on its specific data type. When a memory block is freed, it is returned to the pool of available blocks for its specific data type only, ensuring that the local property of type-specific reuse is maintained. This approach preserves the productivity benefits of memory reuse while enhancing reliability, as the type-specific isolation prevents exploitation even when memory blocks are reused within their designated type heaps.
Data Source
AI summary
One embodiment provides for a non-transitory machine-readable medium storing instructions to cause one or more processors to perform operations comprising receiving an instruction to dynamically allocate memory for an object of a data type and dynamically allocating memory for the object from a heap instance that is specific to the data type for the object, the heap instance including a memory allocator for the data type, the memory allocator generated at compile time for the instruction based on a specification of the data type for the heap instance.


