Lune

ICDE2023Top-tier venue

Sequence-Oriented DBMS Fuzzing

Jie Liang, Yaoguang Chen, Zhiyong Wu, Jingzhou Fu, Mingzhe Wang, Yu Jiang, Xiangdong Huang, Ting Chen, Jiashui Wang, Jiajia Li

Abstract

The SQL specification consists of hundreds of statement types, which leads to difficulties in DBMS fuzzing: stateof-the-art works generally reuse the statements of predefined types; the limited types cannot cover the full input space and test the corresponding logic consequently. In this paper, we propose LEGO, a fuzzer to generate SQL sequences with abundant types to improve DBMS fuzzing coverage. The key idea of sequence generation is type-affinity, which indicates the meaningful occurrence of SQL type pairs (e.g., INSERT and SELECT). During each fuzzing iteration, LEGO first proactively explores SQL statements of different types and analyzes affinities with coverage feedback. Next, when a new affinity is discovered, LEGO synthesizes new SQL sequences containing the types progressively.

We evaluate LEGO on PostgreSQL, MySQL, MariaDB, and Comdb2 against SQLancer, SQLsmith, and SQUIRREL. The sequence-oriented fuzzing helps LEGO outperform other fuzzers on branch coverage by 44%-198%. More importantly, in the continuous fuzzing, LEGO has discovered 102 new vulnerabilities confirmed by the corresponding vendors, including 6 bugs in PostgreSQL, 21 bugs in MySQL, 42 bugs in MariaDB, and 33 bugs in Comdb2. Among them, 22 CVEs have been assigned due to their severe security influences.

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.

22 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

  • EnFuzz: Ensemble Fuzzing with Seed Synchronization among Diverse Fuzzers cites QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing
  • EnFuzz: Ensemble Fuzzing with Seed Synchronization among Diverse Fuzzers cites Evaluating Fuzz Testing
  • Mozi: Discovering DBMS Bugs via Configuration-Based Equivalent Transformation cites EnFuzz: Ensemble Fuzzing with Seed Synchronization among Diverse Fuzzers
  • Mozi: Discovering DBMS Bugs via Configuration-Based Equivalent Transformation cites Testing Database Engines via Pivoted Query Synthesis
  • Detecting Isolation Bugs via Transaction Oracle Construction cites Testing Database Engines via Pivoted Query Synthesis
  • Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database Construction cites Mozi: Discovering DBMS Bugs via Configuration-Based Equivalent Transformation
  • Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database Construction cites Detecting Isolation Bugs via Transaction Oracle Construction
  • Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database Construction cites Testing Database Engines via Pivoted Query Synthesis
  • Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation cites Testing Database Engines via Pivoted Query Synthesis
  • WingFuzz: Implementing Continuous Fuzzing for DBMSs cites Testing Database Engines via Pivoted Query Synthesis
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers22

  1. Detecting Logic Bugs in Database Engines via Equivalent Expression TransformationZu-Ming Jiang, Zhendong SuOSDI 2024 · 22 citations
  2. Detecting Isolation Bugs via Transaction Oracle ConstructionWensheng Dou, Ziyu Cui, Qianwang Dai, Jiansen Song et al.ICSE 2023 · 21 citations
  3. Mozi: Discovering DBMS Bugs via Configuration-Based Equivalent TransformationJie Liang, Zhiyong Wu, Jingzhou Fu, Mingzhe Wang et al.ICSE 2024 · 18 citations
  4. WingFuzz: Implementing Continuous Fuzzing for DBMSsJie Liang, Zhiyong Wu, Jingzhou Fu, Yiyuan Bai et al.USENIX ATC 2024 · 16 citations
  5. Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database ConstructionJiansen Song, Wensheng Dou, Yu Gao, Ziyu Cui et al.VLDB 2024 · 13 citations

Builds on14

  1. Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei et al.CCS 2018 · 753 citations
  2. QSYM : A Practical Concolic Execution Engine Tailored for Hybrid FuzzingInsu Yun, Sangho Lee, Meng Xu, Yeongjin Jang et al.USENIX Security 2018 · 537 citations
  3. REDQUEEN: Fuzzing with Input-to-State CorrespondenceCornelius Aschermann, Sergej Schumilo, Tim Blazytko, Robert Gawlik et al.NDSS 2019 · 413 citations
  4. Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 150 citations
  5. EnFuzz: Ensemble Fuzzing with Seed Synchronization among Diverse FuzzersYuanliang Chen, Yu Jiang, Fuchen Ma, Jie Liang et al.USENIX Security 2019 · 139 citations

Related papers

  1. Systematically Cover SQL Syntactic Structures via 𝑘-SequenceHongtao Zhou, Yingying Zheng, Yu Gao, Jiansen Song et al.ISSTA 2026 · 1 citation
  2. DynSQL: Stateful Fuzzing for Database Management Systems with Complex and Valid SQL Query GenerationZu-Ming Jiang, Jia-Ju Bai, Zhendong SuUSENIX Security 2023
  3. SQUIRREL: Testing Database Management Systems with Language Validity and Coverage FeedbackRui Zhong, Yongheng Chen, Hong Hu, Hangfan Zhang et al.CCS 2020 · 5 citations
  4. VIREO: Human-in-the-Loop DBMS Fuzzing with Visualization and LLM SupportJie Liang, Zhiyong Wu, Jingzhou Fu, Chi Zhang et al.ICDE 2026
  5. Efficiently Detecting DBMS Bugs through Bottom-up Syntax-based SQL GenerationYu Liang, Peng LiuNDSS 2026
Dusk over the sea between two cliffs drawn in fine vertical lines