Visible to the public Compiler-Assisted Hardening of Embedded Software Against Interrupt Latency Side-Channel Attacks

TitleCompiler-Assisted Hardening of Embedded Software Against Interrupt Latency Side-Channel Attacks
Publication TypeConference Paper
Year of Publication2021
AuthorsWinderix, Hans, Mühlberg, Jan Tobias, Piessens, Frank
Conference Name2021 IEEE European Symposium on Security and Privacy (EuroS&P)
Keywordscodes, compiler hardening, compiler security, composability, controlled-channel attacks, Embedded systems, Metrics, microcontrollers, Processor scheduling, Program processors, Prototypes, pubcrawl, Resiliency, side-channel attacks
AbstractRecent controlled-channel attacks exploit timing differences in the rudimentary fetch-decode-execute logic of processors. These new attacks also pose a threat to software on embedded systems. Even when Trusted Execution Environments (TEEs) are used, interrupt latency attacks allow untrusted code to extract application secrets from a vulnerable enclave by scheduling interruption of the enclave. Constant-time programming is effective against these attacks but, as we explain in this paper, can come with some disadvantages regarding performance. To deal with this new threat, we propose a novel algorithm that hardens programs during compilation by aligning the execution time of corresponding instructions in secret-dependent branches. Our results show that, on a class of embedded systems with deterministic execution times, this approach eliminates interrupt latency side-channel leaks and mitigates limitations of constant-time programming. We have implemented our approach in the LLVM compiler infrastructure for the San-cus TEE, which extends the openMSP430 microcontroller, and we discuss applicability to other architectures. We make our implementation and benchmarks available for further research.
DOI10.1109/EuroSP51992.2021.00050
Citation Keywinderix_compiler-assisted_2021