arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.06580cs.AR
收藏

VGF:价值引导模糊测试——像测试硬件一样对硬件进行模糊测试

VGF: Value-Guided Fuzzing -- Fuzzing Hardware as Hardware

Ruochen Dai, Michael Lee, Patrick Hoey, Weimin Fu, Tuba Yavuz, Xiaolong Guo, Shuo Wang, Dean Sullivan, Orlando Arias

AI总结:

针对硬件模糊测试中代码覆盖率受微架构实现影响的问题,本文提出基于设计内部状态覆盖的 VGF 指标及兼容多类仿真器的实现,可显著更快发现缺陷。

摘要:

随着逻辑设计复杂性的增加,有必要开辟测试数字硬件的新途径。模糊测试(fuzzing)近来受到关注,被视为在硬件设计上生成输入向量的一种潜在候选方法。使用该技术时,模糊测试器会为逻辑设计生成一个输入。借助仿真引擎,逻辑设计被给予所生成的激励,同时某种反馈指标会返回给模糊测试器,以辅助输入变异。然而,与软件模糊测试非常相似,硬件模糊测试使用代码覆盖率作为寻找新的可能模糊测试路径的指标。遗憾的是,正如我们在本工作中所展示的,在某些硬件设计上,这种覆盖率指标缺乏通用性;在这些设计中,设计者采用了更直接的方式来表达所需硬件的特定微架构或实现。\n\n通过本工作,我们提出了一种新的覆盖率指标,它不采用代码覆盖率,而是采用设计内部的状态覆盖率。通过观察被测逻辑电路内部信号的变化,我们能够探索设计的状态空间,并向模糊测试引擎提供反馈以生成输入。我们的方法 Value-Guided Fuzzing(VGF,价值引导模糊测试)提供了一种通用覆盖率指标,可应用于任何设计,而不受其实现方式影响。在本文中,我们介绍了基于状态的 VGF 指标,以及一个示例实现;该实现可与任何兼容 VPI、DPI、VHPI 或 FLI 的仿真器一起使用,因此完全与 HDL 无关。我们展示了 VGF 的通用性,并说明我们的示例实现如何能够比以往方法显著更快地发现缺陷。

英文摘要:

As the complexity of logic designs increase, new avenues for testing digital hardware becomes necessary. Fuzz Testing (fuzzing) has recently received attention as a potential candidate for input vector generation on hardware designs. Using this technique, a fuzzer is used to generate an input to a logic design. Using a simulation engine, the logic design is given the generated stimulus and some metric of feedback is given to the fuzzer to aid in the input mutation. However, much like software fuzzing, hardware fuzzing uses code coverage as a metric to find new possible fuzzing paths. Unfortunately, as we show in this work, this coverage metric falls short of generic on some hardware designs where designers have taken a more direct approach at expressing a particular microarchitecture, or implementation, of the desired hardware. With this work, we introduce a new coverage metric which employs not code coverage, but state coverage internal to a design. By observing changes in signals within the logic circuit under testing, we are able to explore the state space of the design and provide feedback to a fuzzer engine for input generation. Our approach, Value-Guided Fuzzing (VGF), provides a generic metric of coverage which can be applied to any design regardless of its implementation. In this paper, we introduce our state-based VGF metric as well as a sample implementation which can be used with any VPI, DPI, VHPI, or FLI compliant simulator, making it completely HDL agnostic. We demonstrate the generality of VGF and show how our sample implementation is capable of finding bugs considerably faster than previous approaches.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑