Secure Register Allocation for Trusted Code Generation
Priyanka Panigrahi, Vemuri Sahithya, Chandan Karfa, Prabhat Mishra · IEEE Embedded Systems Letters · 2022
In this letter, we investigate the inherent vulnerability of register allocation (RA) in which the variables of a source program are mapped to the registers in hardware. This letter makes three important contributions. Specifically, we show that RA is secure if there is no spilling. Next, we show that RA with spilling does not preserve the security properties of the source program. Our experimental evaluation using a wide variety of benchmarks demonstrates that RA in LLVM is not secure. Finally, we propose a secure RA in LLVM that will not introduce additional information leaks in the generated code due to spilling.