Beyond Random Inputs: A Novel ML-Based Hardware Fuzzing (2404.06856v1)
Abstract: Modern computing systems heavily rely on hardware as the root of trust. However, their increasing complexity has given rise to security-critical vulnerabilities that cross-layer at-tacks can exploit. Traditional hardware vulnerability detection methods, such as random regression and formal verification, have limitations. Random regression, while scalable, is slow in exploring hardware, and formal verification techniques are often concerned with manual effort and state explosions. Hardware fuzzing has emerged as an effective approach to exploring and detecting security vulnerabilities in large-scale designs like modern processors. They outperform traditional methods regarding coverage, scalability, and efficiency. However, state-of-the-art fuzzers struggle to achieve comprehensive coverage of intricate hardware designs within a practical timeframe, often falling short of a 70% coverage threshold. We propose a novel ML-based hardware fuzzer, ChatFuzz, to address this challenge. Ourapproach leverages LLMs like ChatGPT to understand processor language, focusing on machine codes and generating assembly code sequences. RL is integrated to guide the input generation process by rewarding the inputs using code coverage metrics. We use the open-source RISCV-based RocketCore processor as our testbed. ChatFuzz achieves condition coverage rate of 75% in just 52 minutes compared to a state-of-the-art fuzzer, which requires a lengthy 30-hour window to reach a similar condition coverage. Furthermore, our fuzzer can attain 80% coverage when provided with a limited pool of 10 simulation instances/licenses within a 130-hour window. During this time, it conducted a total of 199K test cases, of which 6K produced discrepancies with the processor's golden model. Our analysis identified more than 10 unique mismatches, including two new bugs in the RocketCore and discrepancies from the RISC-V ISA Simulator.
- Asanović et al. The Rocket Chip Generator. (UCB/EECS-2016-17), 2016.
- Canakci et al. DirectFuzz: Automated test generation for RTL designs using directed graybox fuzzing. In Design Automation Conference (DAC). IEEE Computer Society, 2021.
- Chen et al. HyPFuzz: Formal-assisted processor fuzzing. arXiv preprint arXiv:2304.02485, 2023.
- Chen et al. Psofuzz: Fuzzing processors with particle swarm optimization. arXiv preprint arXiv:2307.14480, 2023.
- Clarke et al. Progress on the State Explosion Problem in Model Checking. Informatics, 2001.
- Dessouky et al. HardFails: Insights into Software-Exploitable Hardware Bugs. In USENIX Security Symposium. USENIX Association, 2019.
- Fioraldi et al. Afl++: Combining incremental steps of fuzzing research. In USENIX Workshop on Offensive Technologies (WOOT). USENIX Association, 2020.
- Hur et al. DifuzzRTL: Differential fuzz testing to find cpu bugs. In IEEE Symposium on Security and Privacy (S&P). IEEE Computer Society, 2021.
- Kande et al. TheHuzz: Instruction fuzzing of processors using Golden-Reference models for finding Software-Exploitable vulnerabilities. In USENIX Security Symposium. USENIX Association, 2022.
- Laeufer et al. Rfuzz: coverage-directed fuzz testing of rtl on fpgas. In IEEE/ACM International Conference on Computer-Aided Design (ICCAD). IEEE Computer Society, 2018.
- Trippel et al. Fuzzing hardware like software. In USENIX Security Symposium. USENIX Association, 2022.
- Xia et al. Universal fuzzing via large language models. arXiv preprint arXiv:2308.04748, 2023.
- Xu et al. MorFuzz: Fuzzing processor via runtime instruction morphing enhanced synchronizable co-simulation. In USENIX Security Symposium. USENIX Association, 2023.
- Yuji Kukimoto. Introduction to Formal Verification, 2011.
- RISC-V. The risc-v instruction set manual volume i: Unprivileged isa, 2019.