Cipherfix: Mitigating Ciphertext Side-Channel Attacks in Software

10/24/2022
by   Jan Wichelmann, et al.
0

Trusted execution environments are quickly rising in popularity as they enable to run workloads in the cloud without having to trust cloud service providers, by offering additional hardware-assisted security guarantees. One key mechanism for server-grade TEEs is main memory encryption, as it not only prevents system-level attackers from reading the TEE's content, but also provides protection against physical, off-chip attackers. The recent Cipherleaks attacks show that the memory encryption system of AMD SEV-SNP and potentially other TEEs are vulnerable to a new kind of attack, dubbed the ciphertext side-channel. The ciphertext side-channel allows to leak secret data from TEE-protected implementations by analyzing ciphertext patterns exhibited due to deterministic memory encryption. It cannot be mitigated by current best practices like data-oblivious constant-time code. As these ciphertext leakages are inherent to deterministic memory encryption, a hardware fix on existing systems is unlikely. Thus, in this paper, we present a software-based, drop-in solution that can harden existing binaries such that they can be safely executed under TEEs vulnerable to ciphertext side-channels. We combine taint tracking with both static and dynamic binary instrumentation to find sensitive memory locations and prevent the leakage by masking secret data before it gets written to memory. This way, although the memory encryption remains deterministic, we destroy any secret-dependent patterns in encrypted memory. We show that our proof-of-concept implementation can protect constant-time EdDSA and ECDSA implementations against ciphertext side-channels.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/19/2019

Toward Scalable Fully Homomorphic Encryption Through Light Trusted Computing Assistance

It has been a long standing problem to securely outsource computation ta...
research
04/21/2021

Constantine: Automatic Side-Channel Resistance Using Efficient Control and Data Flow Linearization

In the era of microarchitectural side channels, vendors scramble to depl...
research
08/04/2022

Beware of Discarding Used SRAMs: Information is Stored Permanently

Data recovery has long been a focus of the electronics industry for deca...
research
04/20/2020

MemShield: GPU-assisted software memory encryption

Cryptographic algorithm implementations are vulnerable to Cold Boot atta...
research
08/26/2021

Stockade: Hardware Hardening for Distributed Trusted Sandboxes

The widening availability of hardware-based trusted execution environmen...
research
07/15/2022

ERIC: An Efficient and Practical Software Obfuscation Framework

Modern cloud computing systems distribute software executables over a ne...
research
02/25/2021

Swivel: Hardening WebAssembly against Spectre

We describe Swivel, a new compiler framework for hardening WebAssembly (...

Please sign up or login with your details

Forgot password? Click here to reset