高级检索

    RISC-V SBI固件安全启动过程的形式化验证

    Formal Verification for Safe Startup Process of the RISC-V SBI Firmware

    • 摘要: RISC-V SBI(Supervisor Binary Interface)标准制定了RISC-V架构下底层硬件与操作系统的接口规范.与x86和arm等主流架构固件不同,SBI固件更合规、也更可靠.然而,现有SBI固件存在安全漏洞,如启动时的正确性、可信执行环境验证(PMP配置时物理地址访问正确性)等问题.为此,本文提出一种基于定理证明的形式化验证框架,以开发经完整形式化验证的SBI固件-SeSBI.期间,本文结合Dafny?和?Isabelle/HOL?定理证明工具,在不同的特权模式下,对SBI?固件的状态和行为进行形式描述,然后从抽象规范与可执行规范层面进行分层验证.由于SBI固件程序与硬件交互,为优化验证效率,在形式描述时,本文采用硬件模拟策略,显著降低验证过程的计算开销.最终在不同层皆成功验证了SeSBI固件的功能正确性.结果表明,SeSBI以更简洁的代码实现部分SBI标准接口,且具备高度可靠性.结果证明,本文为RISC-V生态系统提供了经过形式化验证的可信SBI固件实现.今后将扩展验证范围以涵盖更多高级属性,进一步完善SeSBI固件的形式化开发及其验证.

       

      Abstract: The RISC-V SBI (Supervisor Binary Interface) standard defines the interface specification between the RISC-V bottom-level hardware and the operating system. Compared with mainstream architectures such as x86 and ARM, RISC-V SBI is more compliant and more reliable. However, the existing SBI firmware implementations have the security vulnerabilities that have emerged, such as the trusted execution environment verification problem in startup process. To this end, this paper proposes a formal verification framework based on theorem proof to develop a fully formally verified SBI firmware-SeSBI. By integrating Dafny with Isabelle/HOL, at both the abstract and executable levels, this study formally specifies and hierarchically verifies the SBI firmware’s state transitions and functional characteristics across privilege modes. Since the SBI firmware program interacts with the hardware, in order to optimize the verification efficiency, this paper adopts a hardware simulation strategy in the formal description, which significantly reduces the computational overhead of the verification process. Finally, the security properties and functional correctness of the SeSBI firmware are successfully verified at different layers. The results show that SeSBI implements some SBI standard interfaces with more concise code and has high reliability. This paper provides a formally verified and highly trusted SBI firmware implementation for the RISC-V ecosystem. In the future, the verification scope will be expanded to cover more advanced properties, and the formal development and verification of the SeSBI firmware will be further improved.

       

    /

    返回文章
    返回