Cryptographic Return Address Chaining for Stack Manipulation Protection
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Reliability
If shadow stacks store return addresses separately, then attack detection is enabled, but memory overhead increases due to multiple unused blocks
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.
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.
Data Source
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.


