Stack Data Indicator Validation for Buffer Overflow Prevention

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems are vulnerable to execution of unwanted code due to the inability to accurately determine the number of data bytes pushed onto a stack, allowing hackers to manipulate routines like printf() to read excessive data, potentially leading to execution of malicious code.

Innovation Solution

A system that receives an indicator representing the amount of data to be read from the stack, ensuring that only the specified amount is read, thereby preventing the execution of unwanted code by limiting data access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If run-time routines read data from the stack without verifying the actual amount pushed, then data processing flexibility is improved, but security deteriorates allowing execution of unwanted code

Engineering Contradiction:
Improvedata processing flexibilityVSAvoidexecution of unwanted code
Core Design Contradiction:
Adaptability or versatilityVSObject-affected harmful factors

Solution Approach 1:

The system performs preliminary validation of the indicator parameter before using it to read data from the stack. By checking whether the indicator represents a valid amount of data beforehand, the system prevents malicious inputs from causing unintended code execution, while still allowing legitimate flexible data processing to proceed.

Inventive Principle:
Principle #10Preliminary action

2Device complexity

If compilers do not check parameter counts in format strings, then code simplicity is improved, but reliability deteriorates allowing buffer overflows

Engineering Contradiction:
Improvecode simplicityVSAvoidbuffer overflow prevention
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The system introduces an intermediary validation mechanism that checks the indicator parameter against the actual stack content. This intermediary layer provides reliability checks without requiring complex compiler modifications, maintaining code simplicity while preventing buffer overflows through runtime validation.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If systems use code identification techniques to prevent malicious code execution, then security against known threats is improved, but security against unknown threats deteriorates due to signature dependency

Engineering Contradiction:
Improveprotection against known malwareVSAvoidprotection against unknown malware
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

Instead of trying to identify malicious code by its characteristics or signatures, the system inverts the approach by preventing code execution based on the validity of the indicator parameter that controls data reading. This parameter-based control mechanism provides security against both known and unknown threats without relying on code identification techniques.

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS7774843B1System, method and computer program product for preventing the execution of unwanted code
Publication Date: 2010.08.10 MCAFEE LLC
  • US7774843B1 patent drawing
  • US7774843B1 patent drawing
  • US7774843B1 patent drawing

AI summary

A system, method and computer program product are provided for preventing the execution of unwanted code. An indicator is initially received which is representative of an amount of data to be read from a stack. An amount of data is then read from the stack based on the indicator, such that execution of unwanted code is avoided.