Guard Word Stack Corruption Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing environments face challenges in detecting and preventing corruption of call stacks, particularly due to overwriting of return addresses, which can lead to unexpected program behavior or malicious attacks, and existing solutions do not effectively address these issues.
Innovation Solution
A computer program product is introduced that includes a method to detect stack corruption by storing a guard word in the stack frame of a caller routine and verifying it in called routines, using specific instructions to initialize and verify the guard word, thereby preventing code injection and enhancing system security.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a guard word is stored in the stack frame to detect corruption, then stack corruption detection capability is improved, but device complexity increases
Solution Approach 1:
The guard word is stored in the stack frame before the called routine executes, establishing a protective marker in advance. This preliminary action enables detection capability to be built into the stack structure itself, rather than adding complex external monitoring systems.
Solution Approach 2:
The guard word acts as an intermediary element between the caller and called routine, serving as a detectable marker that mediates the detection process. This simple intermediary approach avoids the need for complex protection mechanisms while maintaining reliable corruption detection.
2Measurement precision
If verification instructions are added to called routines, then detection precision is improved, but productivity decreases
Solution Approach 1:
The verification instruction is executed only when necessary - specifically when the called routine needs to detect corruption of the caller's stack frame. This partial action approach ensures high detection precision for critical operations while avoiding unnecessary verification overhead in other contexts.
Solution Approach 2:
The called routine performs self-verification by checking the guard word in its own prologue, eliminating the need for external monitoring systems. This self-service approach maintains high detection precision while minimizing overhead, as the verification is integrated into the normal routine execution flow.
3Reliability
If the guard word is checked in every called routine, then reliability is improved, but use of energy increases
Solution Approach 1:
The guard word verification is applied selectively based on local conditions - specifically when the called routine requires stack corruption detection. This local quality approach ensures reliable protection where needed while avoiding unnecessary energy consumption in routines that do not require verification.
Solution Approach 2:
Verification is performed partially - only in called routines that need stack protection rather than in all routines. This selective verification maintains high reliability for critical paths while reducing overall energy consumption by avoiding redundant checks in routines where corruption detection is not required.
Data Source
AI summary
Corruption of call stacks is detected by using guard words placed in the call stacks. A determination is made that a caller routine is to facilitate detection of corruption of stacks. Based on the determination, a store of a guard word in a stack frame of the caller routine is provided in the caller routine. The stored guard word is then used to detect corruption of the stack frame.


