Guard Word Stack Protection for Return Address Integrity

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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 code execution.

Innovation Solution

A computer program product that uses a guard word stored in the call stack to protect return addresses, with hardware instructions to initialize and verify the guard word, allowing called routines to check for corruption and provide an indication if the guard word has an unexpected value.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a guard word is added to the stack to protect return addresses, then stack security is improved, but stack structure complexity increases

Engineering Contradiction:
Improvestack securityVSAvoidstack structure
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The stack structure is segmented into distinct components: the guard word occupies a separate location at the bottom of the stack frame, while the return address is stored in its traditional location. This segmentation allows the guard word to serve as a protective barrier without interfering with the return address storage mechanism, thereby improving security while maintaining clarity in the stack structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The guard word acts as an intermediary element between the stack bottom and the return address. It serves as a protective mediator that can be checked by called routines to detect stack corruption, enabling security verification without directly modifying the return address storage or execution flow.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If called routines check the guard word, then corruption detection is improved, but execution time increases

Engineering Contradiction:
Improvecorruption detectionVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The guard word is checked at the point of return from a called routine, which is a predetermined and necessary step in the execution flow. By performing the check at this natural breakpoint rather than continuously or at multiple additional points, the system achieves reliable corruption detection while minimizing the added execution time to a single verification operation.

Inventive Principle:
Principle #10Preliminary action

3Speed

If hardware instructions are used to store and check guard words, then protection speed is improved, but hardware complexity increases

Engineering Contradiction:
Improveprotection speedVSAvoidhardware complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The hardware instruction set is extended with self-service capabilities that allow the processor itself to automatically store guard words and check their validity during routine execution. The called routine simply executes a check instruction, and the hardware automatically verifies the guard word without requiring external intervention or complex hardware circuits, thereby achieving fast protection with minimal additional hardware complexity.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9891919B2Caller protected stack return address in a hardware managed stack architecture
Publication Date: 2018.02.13 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9891919B2 patent drawing
  • US9891919B2 patent drawing
  • US9891919B2 patent drawing

AI summary

Corruption of program stacks is detected by using guard words placed in the program stacks. A called routine executing on a processor checks a guard word in a stack of a calling routine. The checking determines whether the guard word has an expected value. Based on determining the guard word has an unexpected value, an indication of corruption of the stack is provided. Some routines, however, may not support use of guard words. Thus, routines that are interlinked may have differing protection capabilities. A determination is made as to the differing protection capabilities, an indication of the same is provided, and the routines are executed without failing due to the differing protection capabilities.