Preventing Your Faults From Telling Your Secrets: Defenses Against Pigeonhole Attacks

New hardware primitives such as Intel SGX have emerged which secure a user-level process in presence of an untrusted OS. Such "enclaved execution" systems are vulnerable to several side-channels, one of which is the page fault channel. In this paper, we study the cryptographic routines from OpenSSL and Libgcrypt and measure the channel capacity in the context of such an enclaved execution. We demonstrate that the page fault side-channel is powerful enough to extract bits of encryption keys used in implementations of cryptographic routines -- 33% on average and 100% leakage in best case. We show that the previously conjectured defenses do not work against these attacks. To mitigate this, our first defense masks the page fault channel by determinising the program's memory access behavior. This defense is implemented purely in software and has a significant overhead of upto 4000X, but with our optimizations is reduce to 31.85%. As a second approach we propose contractual execution. With a small change to the hardware, this defense incurs a performance overhead of 6.77% on average.
View on arXiv