Cryptographic Return Address Chaining for Stack Manipulation Protection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing shadow stacks in data processing systems provide inadequate fault protection against manipulation and suffer from memory fragmentation issues, necessitating a more robust and memory-efficient method to protect return addresses from attacks like return-oriented programming (ROP).

Innovation Solution

Implementing a method that encrypts return addresses using a tweakable block cipher or universal hash function, forming a cryptographic chain where each address is dependent on previous addresses, storing only encrypted variants on the stack, and maintaining the topmost encrypted address in an isolated register to prevent manipulation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If shadow stacks are used to protect return addresses, then control flow attacks are thwarted, but memory fragmentation occurs and fault injection attacks remain effective

Engineering Contradiction:
Improveprotection against control flow attacksVSAvoidsusceptibility to fault injection attacks and memory fragmentation
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent replaces the mechanical/memory-based shadow stack isolation with a cryptographic protection mechanism. Instead of relying on memory management units and logical isolation, the invention uses cryptographic primitives (hash functions, encryption) to protect return addresses, making the protection independent of physical memory architecture and resistant to fault injection attacks.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent transforms return addresses through cryptographic parameter changes (hashing, encryption) before storage. This changes the state of return addresses from plaintext to ciphertext, providing protection without requiring separate shadow stack memory structures, thereby eliminating memory fragmentation while maintaining attack resistance.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If shadow stacks store return addresses separately, then attack detection is enabled, but memory overhead increases due to multiple unused blocks

Engineering Contradiction:
Improveattack detection capabilityVSAvoidmemory usage efficiency
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent merges the protection mechanism with the existing return address storage structure. Instead of maintaining separate shadow stack memory blocks, the invention integrates cryptographic protection directly into the return address handling, allowing attack detection without duplicating memory storage and avoiding fragmentation issues.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent creates cryptographic copies (hashed/encrypted versions) of return addresses for protection purposes. These cryptographic copies are computed and stored in place of or alongside original addresses, enabling attack detection while using the same memory space efficiently without creating additional unused memory blocks.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS12579250B2Method to protect a stack from manipulation in a data processing system
Publication Date: 2026.03.17 NXP BV
  • US12579250B2 patent drawing
  • US12579250B2 patent drawing
  • US12579250B2 patent drawing

AI summary

A method is provided to protect a stack of return addresses from manipulation. The return address indicates where to return in a computer program after a subroutine is called. In the method, an encryption key and an initial tweak value is selected. For a return address to be stored on the stack, a first chained address is generated by encrypting the return address with the encryption key and the initial tweak value. The first chained address is provided to the stack instead of the return address. For a subsequent return address that is subsequent to the return address, a second chained address is generated by encrypting the subsequent return address with the encryption key and the first chained address. The second chained address is provided to the stack instead of the subsequent return address. The method provides effective protection without requiring additional memory in a memory limited system.