Lune

CCS2020Top-tier venue

SQUIRREL: Testing Database Management Systems with Language Validity and Coverage Feedback

Rui Zhong, Yongheng Chen, Hong Hu, Hangfan Zhang, Wenke Lee, Dinghao Wu

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

61 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
  • QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing cites Angora: Efficient Fuzzing by Principled Search
  • QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing cites Coverage-based Greybox Fuzzing as Markov Chain
  • Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source cites Coverage-based Greybox Fuzzing as Markov Chain
  • Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning Libraries cites Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source
  • One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation cites QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing
  • One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation cites Directed Greybox Fuzzing
  • One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
  • One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation cites Angora: Efficient Fuzzing by Principled Search
  • One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation cites Coverage-based Greybox Fuzzing as Markov Chain
  • Directed Greybox Fuzzing cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
  • Directed Greybox Fuzzing cites Coverage-based Greybox Fuzzing as Markov Chain
  • Coverage-based Greybox Fuzzing as Markov Chain cites Directed Greybox Fuzzing
  • SnapFuzz: high-throughput fuzzing of network applications cites Directed Greybox Fuzzing
  • SnapFuzz: high-throughput fuzzing of network applications cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
  • SnapFuzz: high-throughput fuzzing of network applications cites Coverage-based Greybox Fuzzing as Markov Chain
  • Angora: Efficient Fuzzing by Principled Search cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
  • Angora: Efficient Fuzzing by Principled Search cites Coverage-based Greybox Fuzzing as Markov Chain
  • Coverage-based Greybox Fuzzing as Markov Chain cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers61

  1. Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 116 citations
  2. Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open SourceAnjiang Wei, Yinlin Deng, Chenyuan Yang, Lingming ZhangICSE 2022 · 91 citations
  3. Large Language Models are Edge-Case Generators: Crafting Unusual Programs for Fuzzing Deep Learning LibrariesYinlin Deng, Chunqiu Steven Xia, Chenyuan Yang, Shizhuo Dylan Zhang et al.ICSE 2024 · 85 citations
  4. One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic ValidationYongheng Chen, Rui Zhong, Hong Hu, Hangfan Zhang et al.S&P 2021 · 70 citations
  5. SnapFuzz: high-throughput fuzzing of network applicationsAnastasios Andronidis, Cristian CadarISSTA 2022 · 56 citations

Builds on17

  1. Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 1,026 citations
  2. Driller: Augmenting Fuzzing Through Selective Symbolic ExecutionNick Stephens, John Grosen, Christopher Salls, Andrew Dutcher et al.NDSS 2016 · 1,021 citations
  3. Directed Greybox FuzzingMarcel Böhme, Van-Thuan Pham, Manh-Dung Nguyen, Abhik RoychoudhuryCCS 2017 · 836 citations
  4. Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 citations
  5. QSYM : A Practical Concolic Execution Engine Tailored for Hybrid FuzzingInsu Yun, Sangho Lee, Meng Xu, Yeongjin Jang et al.USENIX Security 2018 · 537 citations

Related papers

  1. Efficiently Detecting DBMS Bugs through Bottom-up Syntax-based SQL GenerationYu Liang, Peng LiuNDSS 2026
  2. Griffin : Grammar-Free DBMS FuzzingJingzhou Fu, Jie Liang, Zhiyong Wu, Mingzhe Wang et al.ASE 2022 · 44 citations
  3. DynSQL: Stateful Fuzzing for Database Management Systems with Complex and Valid SQL Query GenerationZu-Ming Jiang, Jia-Ju Bai, Zhendong SuUSENIX Security 2023
  4. Sedar: Obtaining High-Quality Seeds for DBMS Fuzzing via Cross-DBMS SQL TransferJingzhou Fu, Jie Liang, Zhiyong Wu, Yu JiangICSE 2024 · 10 citations
  5. SmartFuzz: Leveraging Large Language Models and Feature Composition to Generate High-Quality Seeds for Database FuzzingLi Lin, Jintai Hong, Yanlin Zhuang, Rongxin WuOOPSLA 2026
Dusk over the sea between two cliffs drawn in fine vertical lines