SQUIRREL: Testing Database Management Systems with Language Validity and Coverage Feedback
Rui Zhong, Yongheng Chen, Hong Hu, Hangfan Zhang, Wenke Lee, Dinghao Wu
摘要
Fuzzing is an increasingly popular technique for verifying software functionalities and finding security vulnerabilities. However, current mutation-based fuzzers cannot effectively test database management systems (DBMSs), which strictly check inputs for valid syntax and semantics. Generation-based testing can guarantee the syntax correctness of the inputs, but it does not utilize any feedback, like code coverage, to guide the path exploration. In this paper, we develop Squirrel, a novel fuzzing framework that considers both language validity and coverage feedback to test DBMSs. We design an intermediate representation (IR) to maintain SQL queries in a structural and informative manner. To generate syntactically correct queries, we perform type-based mutations on IR, including statement insertion, deletion and replacement. To mitigate semantic errors, we analyze each IR to identify the logical dependencies between arguments, and generate queries that satisfy these dependencies. We evaluated Squirrel on four popular DBMSs: SQLite, MySQL, PostgreSQL and MariaDB. Squirrel found 51 bugs in SQLite, 7 in MySQL and 5 in MariaDB. 52 of the bugs are fixed with 12 CVEs assigned. In our experiment, Squirrel achieves 2.4×-243.9× higher semantic correctness than state-of-the-art fuzzers, and explores 2.0×-10.9× more new edges than mutation-based tools. These results show that Squirrel is effective in finding memory errors of database management systems.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 61 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing 引用了 Angora: Efficient Fuzzing by Principled Search
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries 引用了 Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Directed Greybox Fuzzing
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Angora: Efficient Fuzzing by Principled Search
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Directed Greybox Fuzzing 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
- Directed Greybox Fuzzing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Coverage-based Greybox Fuzzing as Markov Chain 引用了 Directed Greybox Fuzzing
- SnapFuzz: high-throughput fuzzing of network applications 引用了 Directed Greybox Fuzzing
- SnapFuzz: high-throughput fuzzing of network applications 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
- SnapFuzz: high-throughput fuzzing of network applications 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Angora: Efficient Fuzzing by Principled Search 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
- Angora: Efficient Fuzzing by Principled Search 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Coverage-based Greybox Fuzzing as Markov Chain 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
引用它的顶会 Paper61
- Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 116 次引用
- Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open SourceAnjiang Wei, Yinlin Deng, Chenyuan Yang, Lingming ZhangICSE 2022 · 91 次引用
- Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning LibrariesYinlin Deng, Chunqiu Steven Xia, Chenyuan Yang, Shizhuo Dylan Zhang 等ICSE 2024 · 85 次引用
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic ValidationYongheng Chen, Rui Zhong, Hong Hu, Hangfan Zhang 等S&P 2021 · 70 次引用
- SnapFuzz: high-throughput fuzzing of network applicationsAnastasios Andronidis, Cristian CadarISSTA 2022 · 56 次引用
它引用的 Paper17
- Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 1,026 次引用
- Driller: Augmenting Fuzzing Through Selective Symbolic ExecutionNick Stephens, John Grosen, Christopher Salls, Andrew Dutcher 等NDSS 2016 · 1,021 次引用
- Directed Greybox FuzzingMarcel Böhme, Van-Thuan Pham, Manh-Dung Nguyen, Abhik RoychoudhuryCCS 2017 · 836 次引用
- Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 次引用
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid FuzzingInsu Yun, Sangho Lee, Meng Xu, Yeongjin Jang 等USENIX Security 2018 · 537 次引用
相关 Paper
- Efficiently Detecting DBMS Bugs through Bottom-up Syntax-based SQL GenerationYu Liang, Peng LiuNDSS 2026
- Griffin : Grammar-Free DBMS FuzzingJingzhou Fu, Jie Liang, Zhiyong Wu, Mingzhe Wang 等ASE 2022 · 44 次引用
- DynSQL: Stateful Fuzzing for Database Management Systems with Complex and Valid SQL Query GenerationZu-Ming Jiang, Jia-Ju Bai, Zhendong SuUSENIX Security 2023
- Sedar: Obtaining High-Quality Seeds for DBMS Fuzzing via Cross-DBMS SQL TransferJingzhou Fu, Jie Liang, Zhiyong Wu, Yu JiangICSE 2024 · 10 次引用
- SmartFuzz: Leveraging Large Language Models and Feature Composition to Generate High-Quality Seeds for Database FuzzingLi Lin, Jintai Hong, Yanlin Zhuang, Rongxin WuOOPSLA 2026
