SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: van der Wall, Sören, Meyer, Roland
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913582260682752
author van der Wall, Sören
Meyer, Roland
author_facet van der Wall, Sören
Meyer, Roland
contents We address the problem of preserving non-interference across compiler transformations under speculative semantics. We develop a proof method that ensures the preservation uniformly across all source programs. The basis of our proof method is a new form of simulation relation. It operates over directives that model the attacker's control over the micro-architectural state, and it accounts for the fact that the compiler transformation may change the influence of the micro-architectural state on the execution (and hence the directives). Using our proof method, we show the correctness of dead code elimination. When we tried to prove register allocation correct, we identified a previously unknown weakness that introduces violations to non-interference. We have confirmed the weakness for a mainstream compiler on code from the libsodium cryptographic library. To reclaim security once more, we develop a novel static analysis that operates on a product of source program and register-allocated program. Using the analysis, we present an automated fix to existing register allocation implementations. We prove the correctness of the fixed register allocations with our proof method.
format Preprint
id arxiv_https___arxiv_org_abs_2407_15080
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
van der Wall, Sören
Meyer, Roland
Programming Languages
Cryptography and Security
We address the problem of preserving non-interference across compiler transformations under speculative semantics. We develop a proof method that ensures the preservation uniformly across all source programs. The basis of our proof method is a new form of simulation relation. It operates over directives that model the attacker's control over the micro-architectural state, and it accounts for the fact that the compiler transformation may change the influence of the micro-architectural state on the execution (and hence the directives). Using our proof method, we show the correctness of dead code elimination. When we tried to prove register allocation correct, we identified a previously unknown weakness that introduces violations to non-interference. We have confirmed the weakness for a mainstream compiler on code from the libsodium cryptographic library. To reclaim security once more, we develop a novel static analysis that operates on a product of source program and register-allocated program. Using the analysis, we present an automated fix to existing register allocation implementations. We prove the correctness of the fixed register allocations with our proof method.
title SNIP: Speculative Execution and Non-Interference Preservation for Compiler Transformations
topic Programming Languages
Cryptography and Security
url https://arxiv.org/abs/2407.15080