GrayC: Greybox Fuzzing of Compilers and Analysers for C
Karine Even-Mendoza, Arindam Sharma, Alastair F. Donaldson, Cristian Cadar
摘要
Fuzzing of compilers and code analysers has led to a large number of bugs being found and fixed in widely-used frameworks such as LLVM, GCC and Frama-C. Most such fuzzing techniques have taken a blackbox approach, with compilers and code analysers starting to become relatively immune to such fuzzers. We propose a coverage-directed, mutation-based approach for fuzzing C compilers and code analysers, inspired by the success of this type of greybox fuzzing in other application domains. The main challenge of applying mutation-based fuzzing in this context is that naive mutations are likely to generate programs that do not compile. Such programs are not useful for finding deep bugs that affect optimisation, analysis, and code generation routines. We have designed a novel greybox fuzzer for C compilers and analysers by developing a new set of mutations to target common C constructs, and transforming fuzzed programs so that they produce meaningful output, allowing differential testing to be used as a test oracle, and paving the way for fuzzer-generated programs to be integrated into compiler and code analyser regression test suites. We have implemented our approach in GrayC, a new opensource LibFuzzer-based tool, and present experiments showing that it provides more coverage on the middle-and back-end stages of compilers and analysers compared to other mutation-based approaches, including Clang-Fuzzer, PolyGlot, and a technique similar to LangFuzz. We have used GrayC to identify 30 confirmed compiler and code analyser bugs: 25 previously unknown bugs (with 22 of them already fixed in response to our reports) and 5 confirmed bugs reported independently shortly before we found them. A further 3 bug reports are under investigation. Apart from the results above, we have contributed 24 simplified versions of coverage-enhancing test cases produced by GrayC to the Clang/LLVM test suite, targeting 78 previously uncovered functions in the LLVM codebase.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 34 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models 引用了 The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation Operators
- WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models 引用了 Fuzz4All: Universal Fuzzing with Large Language Models
- WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models 引用了 Random testing for C and C++ compilers with YARPGen
- WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language Models 引用了 One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation
- The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation Operators 引用了 Fuzz4All: Universal Fuzzing with Large Language Models
- The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation Operators 引用了 Random testing for C and C++ compilers with YARPGen
- Boosting Compiler Testing by Injecting Real-World Code 引用了 Random testing for C and C++ compilers with YARPGen
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 NAUTILUS: Fishing for Deep Bugs with Grammars
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 Random testing for C and C++ compilers with YARPGen
- Fuzz4All: Universal Fuzzing with Large Language Models 引用了 One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 NAUTILUS: Fishing for Deep Bugs with Grammars
引用它的顶会 Paper34
- Fuzz4All: Universal Fuzzing with Large Language ModelsChunqiu Steven Xia, Matteo Paltenghi, Jia Le Tian, Michael Pradel 等ICSE 2024 · 155 次引用
- WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language ModelsChenyuan Yang, Yinlin Deng, Runyu Lu, Jiayi Yao 等OOPSLA 2024 · 74 次引用
- The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation OperatorsXianfei Ou, Cong Li, Yanyan Jiang, Chang XuASPLOS 2024 · 25 次引用
- Boosting Compiler Testing by Injecting Real-World CodeShaohua Li, Theodoros Theodoridis, Zhendong SuPLDI 2024 · 24 次引用
- Towards Understanding the Bugs in Solidity CompilerHaoyang Ma, Wuqi Zhang, Qingchao Shen, Yongqiang Tian 等ISSTA 2024 · 9 次引用
它引用的 Paper4
- NAUTILUS: Fishing for Deep Bugs with GrammarsCornelius Aschermann, Tommaso Frassetto, Thorsten Holz, Patrick Jauernig 等NDSS 2019 · 291 次引用
- Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 次引用
- Detecting optimization bugs in database engines via non-optimizing reference engine constructionManuel Rigger, Zhendong SuFSE 2020 · 104 次引用
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic ValidationYongheng Chen, Rui Zhong, Hong Hu, Hangfan Zhang 等S&P 2021 · 70 次引用
相关 Paper
- Repair-Driven Greybox FuzzingBachir Bendrissou, Alastair F. Donaldson, Cristian CadarISSTA 2026
- Optimization-Directed Compiler Fuzzing for Continuous Translation ValidationJaeseong Kwon, Bongjun Jang, Juneyoung Lee, Kihong HeoPLDI 2025 · 5 次引用
- IRFuzzer: Specialized Fuzzing for LLVM Backend Code GenerationYuyang Rong, Zhanghan Yu, Zhenkai Weng, Stephen Neuendorffer 等ICSE 2025 · 1 次引用
- Guiding Greybox Fuzzing with Mutation TestingVasudev Vikram, Isabella Laybourn, Ao Li, Nicole Nair 等ISSTA 2023 · 22 次引用
- InstruGuard: Find and Fix Instrumentation Errors for Coverage-based Greybox FuzzingYuwei Liu, Yanhao Wang, Purui Su, Yuanping Yu 等ASE 2021 · 8 次引用
