Heap Buffer Overflow Prevention via Link Validation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Heap buffer overflow attacks allow malicious hackers to inject unauthorized code, granting remote system access by corrupting memory links, which existing technologies fail to effectively prevent.

Innovation Solution

The method stalls heap allocation and deallocation function calls, predicts block links within the heap segment, and takes corrective action if links are found outside the segment, ensuring they point within the associated heap segment to prevent malicious code execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Object-affected harmful factors

If heap buffer overflow attack is launched to overwrite memory links, then unauthorized code execution is enabled, but system security is compromised

Engineering Contradiction:
Improveheap buffer overflow attackVSAvoidsystem security
Core Design Contradiction:
Object-affected harmful factorsVSReliability

Solution Approach 1:

The patent applies preliminary action by validating heap buffer addresses and link integrity before allocating or deallocating memory blocks. The system checks whether forward and backward links point to valid addresses within the heap segment before proceeding with allocation or deallocation operations, preventing buffer overflow exploits from corrupting memory management structures.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary validation mechanism that acts as a mediator between heap operations and memory management functions. This intermediary layer verifies address validity and link integrity, blocking malicious operations while allowing legitimate memory management to proceed unchanged.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If existing memory management functions are used without validation, then allocation and deallocation operations are fast, but they fail to prevent buffer overflow attacks

Engineering Contradiction:
Improveallocation speedVSAvoidattack prevention
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The validation checks are performed as preliminary actions within the existing allocation and deallocation workflows. By integrating address validation and link verification into the function prologue, the system maintains operational speed while adding security checks that prevent buffer overflow attacks from succeeding.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The memory management functions perform self-validation by checking their own internal structures (forward and backward links) for integrity. This self-service approach allows the system to detect and prevent corrupted link states without requiring external validation mechanisms, maintaining both speed and security.

Inventive Principle:
Principle #25Self-service

3Device complexity

If F-links and B-links are not validated, then memory management operations are simple, but stray links enable malicious code injection

Engineering Contradiction:
Improvememory management complexityVSAvoidstray links
Core Design Contradiction:
Device complexityVSObject-affected harmful factors

Solution Approach 1:

The patent implements feedback by having the memory management system continuously verify the integrity of forward and backward links during allocation and deallocation operations. When invalid or stray links are detected, the system provides feedback by correcting or rejecting the operation, preventing malicious code injection while maintaining relatively simple validation logic.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent replaces complex manual validation mechanisms with automated address verification using CPU address validation capabilities. This substitution reduces the apparent complexity of memory management by leveraging hardware or OS-level address validation features to automatically verify link integrity without requiring complex software validation logic.

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

Data Source

PatentUS7328323B1Heap buffer overflow exploitation prevention system and method
Publication Date: 2008.02.05 CA TECH INC
  • US7328323B1 patent drawing
  • US7328323B1 patent drawing
  • US7328323B1 patent drawing

AI summary

A method includes stalling a call to a heap allocation function originating from a request by an application for a block of heap buffer, predicting a block of the heap buffer to fulfill the request, and determining if a forward link (F-link) and a backward link (B-link) of the predicted block are addresses within a heap segment associated with the predicted block. If a determination is made that the F-link or the B-link point outside the associated heap segment, e.g., have been overwritten by a heap buffer overflow attack, corrective action is taken to correct the stray F-link or B-link. After the corrective action is taken, the heap allocation function call is released and the block of heap buffer is allocated. In this manner, a heap buffer overflow attack is defeated.