Stack Data Indicator Validation for Buffer Overflow Prevention
Find Innovative SolutionsGenerate 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
Engineering 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
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.
2Device complexity
If compilers do not check parameter counts in format strings, then code simplicity is improved, but reliability deteriorates allowing buffer overflows
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.
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
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.
Data Source
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.


