SPARC Register Window Protection Against RoP Stack Overflows
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
SPARC-type architectures are vulnerable to Return Oriented Programming (RoP) attacks, particularly stack overflows, which existing solutions like 'canary' values are circumventable and costly in terms of performance.
Innovation Solution
Implement a SPARC-type architecture with a cyclic data storage structure and a reserved area accessible only in privileged mode, where data is saved and restored using an exception routine to prevent unauthorized access and modification of return addresses.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If canary values are used to detect stack overflow attacks, then detection capability is improved, but reliability remains insufficient and performance is degraded
Solution Approach 1:
The stack is segmented into protected regions with controlled access. The exception routine operates in a privileged mode that separates detection functions from normal application execution, creating distinct security zones that prevent unauthorized access while maintaining performance.
Solution Approach 2:
The exception routine acts as an intermediary between the stack and potential attackers. It monitors stack operations and intercepts overflow attempts before they can compromise return addresses, providing reliable detection without requiring performance-degrading canary values in every stack frame.
2Reliability
If canary values are placed in the stack, then stack overflow detection is enabled, but the solution is circumventable and costly
Solution Approach 1:
The system dynamically switches between normal execution mode and privileged exception handling mode. The exception routine is activated only when needed (on exception occurrence) rather than being statically present in all stack operations, reducing architectural complexity while maintaining security reliability.
Solution Approach 2:
The exception routine automatically handles stack protection without requiring external intervention or complex configuration. It self-manages the detection and response to stack overflow attempts, simplifying the overall architecture while ensuring reliable security enforcement.
3Adaptability or versatility
If return addresses are made accessible for modification, then application flexibility is improved, but vulnerability to RoP attacks increases
Solution Approach 1:
The system preemptively prevents RoP attacks by establishing access controls on return addresses before attacks can occur. The exception routine monitors and protects return addresses in advance, blocking malicious modifications while allowing legitimate application operations to proceed with full flexibility.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present invention relates to a SPARC-type architecture (10) comprising a processor (12) and a memory (14) comprising a cyclic structure (29). The cyclic structure (29) comprises a plurality of windows. The processor (12) defines a normal mode and a privileged mode for application execution and is configured to, in the event of data overwriting in the oldest window, raise an overflow exception and execute an exception handling routine in its privileged mode. The architecture (10) is characterized in that the memory (14) further comprises a reserved area (30) accessible for data reading/writing only by the processor (12) in its privileged mode, and in that the exception handling routine is configured to copy the data from the oldest window into the reserved area (30) when an overflow exception has been raised.