Guard Word Mechanism for Hardware Stack Corruption Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing computing environments face challenges in detecting and preventing corruption of call stacks, which can lead to unexpected return addresses, potentially causing malicious or innocent data corruption, and existing solutions are inadequate in ensuring data integrity.

Innovation Solution

The implementation of a guard word mechanism, where a specific word is stored in the call stack and checked by called routines to verify its integrity, using hardware instructions to detect corruption and prevent data corruption by ensuring the return address is valid.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a guard word mechanism is implemented to detect stack corruption, then stack corruption detection capability is improved, but device complexity increases due to additional instructions and checking logic

Engineering Contradiction:
Improvestack corruption detection capabilityVSAvoidinstruction and checking logic complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The guard word is placed on the stack in advance before the return address, serving as a preliminary protective measure. This allows the called routine to detect corruption before it reaches the return address, enabling early intervention without complex real-time monitoring mechanisms.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The guard word acts as an intermediary element between the calling routine and the return address. By checking this intermediate value, the system can detect corruption without directly monitoring the return address itself, simplifying the detection mechanism while maintaining reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If guard word checking is performed in every called routine, then data integrity is improved, but processing time increases due to additional checking operations

Engineering Contradiction:
Improvedata integrityVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs guard word checking in a partial manner - only in called routines that may potentially corrupt the stack. Not all routines require this checking, allowing the system to balance data integrity with processing efficiency by applying protection selectively rather than universally.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If the guard word is stored directly in the stack protecting the return address, then stack protection is improved, but the stack structure complexity increases

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

Solution Approach 1:

The stack structure is segmented into distinct regions: the guard word region and the return address region. This segmentation allows independent management and checking of each component, simplifying the overall protection mechanism by treating the guard word as a separate, manageable unit rather than integrating it complexly with the return address storage.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10120745B2Providing instructions to protect stack return addresses in a hardware managed stack architecture
Publication Date: 2018.11.06 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10120745B2 patent drawing
  • US10120745B2 patent drawing
  • US10120745B2 patent drawing

AI summary

Corruption of program stacks is detected by using guard words placed in the program stacks. An instruction, which is to be used in protecting stacks of a computing environment, is provided in a called routine, based on determining that the called routine is to include logic to detect corruption of stacks. The instruction in the called routine is to check a guard word provided by a calling routine to determine whether a stack is corrupt.