[Paper Review] Preventing Your Faults From Telling Your Secrets: Defenses Against Pigeonhole Attacks
This paper proposes deterministic multiplexing, a software-only defense to prevent page fault side-channel attacks (pigeonhole attacks) in enclaved execution environments like Intel SGX. By ensuring consistent page fault patterns regardless of secret inputs, the method achieves page-fault obliviousness, reducing overhead from 4000× to 29.22% with compiler optimizations and down to 6.77% with lightweight hardware support.
New hardware primitives such as Intel SGX secure a user-level process in presence of an untrusted or compromised OS. Such "enclaved execution" systems are vulnerable to several side-channels, one of which is the page fault channel. In this paper, we show that the page fault side-channel has sufficient channel capacity to extract bits of encryption keys from commodity implementations of cryptographic routines in OpenSSL and Libgcrypt --- leaking 27% on average and up to 100% of the secret bits in many case-studies. To mitigate this, we propose a software-only defense that masks page fault patterns by determinising the program's memory access behavior. We show that such a technique can be built into a compiler, and implement it for a subset of C which is sufficient to handle the cryptographic routines we study. This defense when implemented generically can have significant overhead of up to 4000X, but with help of developer-assisted compiler optimizations, the overhead reduces to at most 29.22% in our case studies. Finally, we discuss scope for hardware-assisted defenses, and show one solution that can reduce overheads to 6.77% with support from hardware changes.
Motivation & Objective
- Address the threat of page fault side-channel attacks in enclaved execution systems such as Intel SGX, where an untrusted OS can infer secrets via observed page faults.
- Demonstrate that existing cryptographic implementations (OpenSSL, Libgcrypt) are vulnerable to information leakage through the page fault channel, with up to 100% key recovery in some cases.
- Propose a new security property—page-fault obliviousness—ensuring that page fault patterns remain indistinguishable across different secret inputs.
- Design and implement a compiler-based software defense (deterministic multiplexing) that masks input-dependent memory access patterns to prevent leakage.
- Evaluate performance trade-offs and present hardware-assisted optimizations to significantly reduce runtime overhead while maintaining security.
Proposed method
- Introduce deterministic multiplexing: proactively access all input-dependent data and code pages in a fixed, input-agnostic sequence to eliminate variations in page fault patterns.
- Implement the defense as an extension to the LLVM compiler, targeting a subset of C sufficient for cryptographic routines in OpenSSL and Libgcrypt.
- Apply static analysis and program structure awareness to optimize the deterministic multiplexing overhead, reducing it from 4000× to 29.22% in case studies.
- Propose a hardware-assisted variant that leverages dedicated memory management support to further reduce overhead to 6.77% on average.
- Use a compiler-based approach to insert memory access patterns that ensure fault behavior is independent of secret inputs, achieving PF-obliviousness.
- Evaluate the defense on real cryptographic primitives (AES, EdDSA, RSA) under controlled page allocation to simulate adversarial OS behavior.
Experimental results
Research questions
- RQ1To what extent can the page fault side-channel be exploited to extract secret keys from cryptographic implementations in OpenSSL and Libgcrypt?
- RQ2Can a purely software-based defense achieve page-fault obliviousness without relying on hardware support or trusted OS components?
- RQ3What performance overhead does deterministic multiplexing incur, and can it be reduced to practical levels through compiler optimizations?
- RQ4How effective is a hardware-assisted variant in minimizing runtime overhead while preserving security guarantees?
- RQ5Can the defense be generically applied to cryptographic routines without breaking functional correctness or introducing new attack vectors?
Key findings
- The page fault side-channel has sufficient channel capacity to extract up to 100% of secret key bits in vulnerable cryptographic implementations, with an average leakage of 27%.
- A naive implementation of deterministic multiplexing incurs a performance overhead of up to 4000×, rendering it impractical for production use.
- With developer-assisted compiler optimizations, the overhead is reduced to a maximum of 29.22% across all evaluated cryptographic case studies.
- A hardware-assisted variant reduces the worst-case overhead to 6.77%, making the defense viable for performance-critical applications.
- The defense successfully prevents the OS from distinguishing execution patterns based on secret inputs, achieving the goal of page-fault obliviousness.
- Existing defenses for cache and timing side-channels are ineffective against pigeonhole attacks, highlighting the need for a dedicated solution.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.