Fault-Oriented Programming for Secure Enclave Side-Channel Defense
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current processors with secure enclaves like Intel SGX are vulnerable to side-channel attacks, where an attacker with control over the OS/VMM can manipulate page table permissions to induce page faults and recover control-flow graphs or memory access patterns, which existing defensive methods like static code randomization and oblivious memory are either ineffective or inefficient.
Innovation Solution
Implementing fault-oriented programming by instrumenting a secure enclave binary with gadgets and a fault-generating function that selects a random sequence of gadgets to execute, generating random page faults and adding noise to the page fault sequence, thus defeating side-channel attacks without modifying existing binaries or source code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If oblivious memory is used to defend against side-channel attacks, then security is improved, but execution speed deteriorates significantly (more than ten times slower)
Solution Approach 1:
The patent introduces an intermediary layer (the fault-generating function and gadgets) between the secure enclave code and the memory system. This intermediary generates controlled page faults that act as noise, preventing attackers from observing real memory access patterns while allowing the code to execute normally. This resolves the contradiction by providing security through the intermediary mechanism without requiring the complete rewriting and performance penalty of oblivious memory.
2Reliability
If execution path randomization is used to defend against side-channel attacks, then security is improved, but memory usage increases due to code duplication
Solution Approach 1:
The patent extracts the randomization mechanism from the code itself and places it in a separate fault-generating function. Instead of duplicating code paths, the system extracts a small set of gadgets and a randomization function that can generate diverse execution patterns. This resolves the contradiction by providing security through extraction and separation, avoiding code duplication while maintaining low memory overhead.
3Measurement precision
If page table permissions are manipulated to induce page faults, then control-flow graph information is obtained, but security is compromised
Solution Approach 1:
The patent converts the harmful effect of page faults (which leak information to attackers) into a beneficial security mechanism. By intentionally generating random page faults through gadgets, the system creates noise that masks real memory access patterns. This resolves the contradiction by converting the information-leaking mechanism into a security-defense mechanism, where page faults are used to protect rather than expose control-flow information.
Data Source
AI summary
Technologies for defeating secure enclave side-channel attacks include a computing device having a processor with secure enclave support. The computing device instruments an executable binary with multiple gadgets, a fault-generating function, and at least one invocation of the fault-generating function. The computing device executes the instrumented executable binary within a secure enclave. During execution of the instrumented binary, each gadget may be located at a different memory page of the secure enclave. The computing device invokes the fault-generating function, which selects a random sequence of the gadgets and executes the random sequence of gadgets. The processor may generate a page fault in response to executing each of the gadgets. Each gadget may generate one or more data accesses to memory pages within the secure enclave. The processor may generate a page fault in response to each of the data accesses. Other embodiments are described and claimed.


