Hardware-software leakage contracts have emerged as a formalism for specifying side-channel security guarantees of modern processors, yet verifying that a complex hardware design complies with its contract remains a major challenge. While verification provides strong guarantees, current verification approaches struggle to scale to industrial-sized designs. Conversely, prevalent hardware fuzzing approaches are designed to find functional correctness bugs, but are blind to information leaks like Spectre. To bridge this gap, we introduce a novel and scalable approach: coverage-guided hardware-software contract fuzzing. Our methodology leverages a self-compositional framework to make information leakage directly observable as microarchitectural state divergence. The core of our contribution is a new, security-oriented coverage metric, Self-Composition Deviation (SCD), which guides the fuzzer to explore execution paths that violate the leakage contract. We implemented this approach and performed an extensive evaluation on two open-source RISC-V cores: the in-order Rocket Core and the complex out-of-order BOOM core. Our results demonstrate that coverage-guided strategies outperform unguided fuzzing and that increased microarchitectural coverage leads to a faster discovery of security vulnerabilities in the BOOM core.
翻译:硬件-软件泄漏契约已成为规范现代处理器侧信道安全保证的形式化方法,然而验证复杂硬件设计是否遵循其契约仍是一项重大挑战。尽管验证能提供强有力的保证,但当前的验证方法难以扩展至工业级规模的设计。相反,主流的硬件模糊测试方法旨在发现功能正确性缺陷,却对类似Spectre的信息泄漏视而不见。为弥合这一差距,我们提出了一种新颖且可扩展的方法:覆盖率导向的硬件-软件契约模糊测试。该方法利用自组合框架,将信息泄漏直接表征为微架构状态分歧。我们的核心贡献是一种新的面向安全的覆盖率度量指标——自组合偏差(SCD),它引导模糊测试器探索违反泄漏契约的执行路径。我们实现了该方法,并在两个开源RISC-V内核上进行了广泛评估:顺序执行的Rocket Core和复杂的乱序执行BOOM Core。实验结果表明,覆盖率导向策略优于无引导模糊测试,且微架构覆盖率的提升能更快地发现BOOM Core中的安全漏洞。