Flashpoint: Privileged-Software Isolation on RISC-V for Dynamic Root of Trust
Abstract
Bugs in the large platform firmware executing in the highest privilege mode put the entire system's security at risk. We present a solution to isolate software in the highest privilege mode on RISC-V. Our solution is a hardware-software co-design comprising a minimal ISA extension and a thin mediating software. Our solution enables remotely attestable dynamic root of trust for a trusted security monitor and removes boot-time firmware, which can execute arbitrary code in the highest privilege mode, from the TCB. We extend the open-source XiangShan processor with our ISA extension, incurring negligible hardware overhead (0.039%). We simulate the full software stack on an FPGA, which shows negligible boot-time overhead (0.008% more instructions, 0.006% more cycles) to enable dynamic root of trust. We demonstrate the end-to-end dynamic root of trust with a TPM emulator on QEMU. We use exhaustive model checking to verify correct isolation enforcement in the highest privilege mode, thanks to the system's finiteness. To this end, we formally specify our ISA extension in Sail, translate the CPU model to Rust (using an existing compiler), and verify it alongside our Rust-based mediating software with the Kani model checker. Finally, we demonstrate our solution's generality with a case study that isolates a security monitor from the run-time platform firmware.