Call Stack Integrity via Hash Verification
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing information processing devices face risks of call stack corruption during context switches, which can lead to incorrect data processing and device crashes due to potential errors or malicious instructions in new processes.
Innovation Solution
The implementation of a system that generates and compares hash values for selected call stack items before and after context changes, using a hash unit to ensure data integrity by detecting any modifications and triggering appropriate actions if corruption is detected, such as error warnings or restoring original data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If context switches are allowed between processes, then system versatility and responsiveness are improved, but the risk of call stack corruption increases
Solution Approach 1:
The system performs preliminary actions by generating a first hash value of the call stack before allowing a context switch to occur. This pre-computation establishes a baseline for later verification, enabling the system to maintain reliability while permitting versatile context switching operations.
Solution Approach 2:
The system implements feedback by generating a second hash value after the context switch and comparing it with the first hash value. This feedback mechanism detects any unauthorized modifications to the call stack, ensuring that reliability is maintained even as versatility increases through frequent context switches.
2Reliability
If hash value verification is performed after every context change, then call stack integrity is improved, but processing time increases
Solution Approach 1:
The system extracts only the essential verification step by generating and comparing hash values, rather than performing comprehensive stack validation. This selective approach maintains call stack integrity while minimizing the time penalty associated with verification overhead.
Solution Approach 2:
The system changes the parameter of verification from detailed stack element-by-element checking to a single hash value comparison. This parameter transformation reduces the computational complexity and time required for verification while preserving the ability to detect corruption.
3Measurement precision
If hash values are generated and compared for all call stack items, then detection precision is improved, but device complexity increases
Solution Approach 1:
The system introduces hash values as intermediary representations of the call stack content. Instead of directly analyzing and comparing individual stack elements, the system uses hash values as mediators that encapsulate the entire stack state, thereby maintaining detection precision while reducing operational complexity.
Solution Approach 2:
The system creates a simplified copy of the call stack's essential characteristics in the form of hash values. These hash value copies preserve the information needed for corruption detection without requiring the system to manage and compare the full complexity of the actual stack contents.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
An information processing device (10) comprises a control unit (12), a hash unit (16), and a comparison unit (18). The control unit (12) is arranged to run a program and to store at least flow control information of the program in a call stack. The hash unit (16) is arranged to generate a first hash value by applying a hash function to selected data in response to a first context change of the program, the selected data comprising at least one or more selected items of the call stack, the first context change comprising a termination or interruption of a first process or thread of the program. The control unit (12) is further arranged to start or resume a second process or thread of the program only when the hash unit has generated the first hash value. The hash unit (16) is further arranged to generate a second hash value by re-applying the hash function to the selected data in response to a second context change, the second context change comprising a termination or interruption of the second process or thread. The comparison unit (18) is arranged to determine whether the first hash value and the second hash value are identical.