Exception Return State Locking for Guarded Control Stack Integrity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data processing systems are vulnerable to Return-Oriented-Programming (ROP) attacks that manipulate exception return state information, allowing attackers to control program flow incorrectly, which current protection mechanisms like guarded control stacks (GCS) fail to address the windows of time between instructions, and the GCS exception return state push and pop operations are complex to implement.
Innovation Solution
Implement an exception return state lock parameter to lock the exception return state information during specific operating states, preventing tampering between exception entry and push to the GCS data structure and between the GCS exception return state pop operations, and between pop and exception return, enhancing security by ensuring the integrity of the GCS-protected information.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If exception return state locking is implemented to ensure data consistency, then reliability is improved, but device complexity increases
Solution Approach 1:
The patent extracts the locking mechanism from the normal data access path and implements it only for exception return states. The locking is selectively applied only when exceptions occur during data writing, rather than being a permanent feature for all operations. This reduces overall system complexity while maintaining reliability where needed.
Solution Approach 2:
The patent implements preliminary locking before executing exception handling code. By acquiring the lock before processing exceptions and releasing it after, the system ensures data consistency during critical exception states without requiring continuous locking. This preliminary action approach maintains reliability while minimizing the duration and scope of locking operations.
2Reliability
If exception handling code is added to lock and unlock parameters, then reliability is improved, but code complexity increases
Solution Approach 1:
The patent implements self-service exception handling through try-finally blocks that automatically acquire locks before operations and release them in finally blocks. This automated self-service approach reduces the need for complex manual exception handling code while ensuring reliability. The locking and unlocking is performed automatically by the structured exception handling mechanism rather than requiring complex conditional logic.
3Device complexity
If data writing operations are performed without locking, then device complexity is reduced, but data consistency deteriorates
Solution Approach 1:
The patent applies locking with local quality by implementing it specifically for exception return states rather than universally. The locking mechanism is applied locally only where exception handling occurs during data writing operations, rather than being applied system-wide to all data access. This localized approach maintains data consistency in critical areas while minimizing overall system complexity.
Data Source
Figure 1
Figure 2~3
Figure 4~5
AI summary
An apparatus comprises exception return state register storage, and processing circuitry. In response to a guarded control stack (GCS) exception return state push instruction, the processing circuitry obtains exception return state information from the exception return state register storage and push the state information to a GCS data structure. In response to a GCS exception return state pop instruction, the processing circuitry obtains GCS-protected exception return state information from the GCS data structure. In at least one operating state, the processing circuitry detects, in response to an attempt to modify the exception return state information stored in the exception return state register storage, whether an exception return state lock parameter is in a locked state or an unlocked state, and signals a fault when it is in the locked state.