Lune

NDSS2026顶会

Efficiently Detecting DBMS Bugs through Bottom-up Syntax-based SQL Generation

Yu Liang, Peng Liu

摘要

—Syntax-based testing is a promising technique for finding bugs in Database Management Systems (DBMSs). All existing syntax-based SQL generation tools apply a Top-down generation method. To construct a SQL query (syntax tree), the generator forward explores the SQL grammar starting from the root node, and it stops when no further grammar rule can be applied to the leaves of the syntax tree. However, the Top-down generation method tends to put more effort into exploring the shallow grammar close to the root and neglects the feature-rich grammar deeper in the grammar space. Therefore, it is not efficient in finding DBMS bugs. This paper proposes a new Bottom-up syntax-based SQL generation technique that puts more testing resources into exploring the feature-rich grammar rules. The exploration of SQL grammar begins with one interesting grammar rule that outlines the syntax of feature-rich SQL functionalities. The generator then backtracks (Bottom-up) this grammar rule to the root to create a syntax path that unveils this interesting grammar. Multiple Bottom-up generated syntax paths are then expanded and merged to create diverse SQL queries for fuzzing. A prototype tool, SQLBull , adopts the Bottom-up generation technique for fuzzing. In the evaluation, SQLBull found 63 zero-day bugs from 5 well-tested DBMSs: MySQL , MariaDB , CockroachDB , DuckDB , and PostgreSQL . It outperforms all existing tools in both bug-finding and code coverage. The evaluation results verify the effectiveness of the Bottom-up generation technique.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Finding bugs in database systems via query partitioning 引用了 Detecting optimization bugs in database engines via non-optimizing reference engine construction
  • Finding bugs in database systems via query partitioning 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Detecting optimization bugs in database engines via non-optimizing reference engine construction 引用了 Testing Database Engines via Pivoted Query Synthesis
  • Fuzzing JavaScript Engines with Aspect-preserving Mutation 引用了 NAUTILUS: Fishing for Deep Bugs with Grammars
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper19

  1. NAUTILUS: Fishing for Deep Bugs with GrammarsCornelius Aschermann, Tommaso Frassetto, Thorsten Holz, Patrick Jauernig 等NDSS 2019 · 291 次引用
  2. Testing Database Engines via Pivoted Query SynthesisManuel Rigger, Zhendong SuOSDI 2020 · 150 次引用
  3. Fuzzing JavaScript Engines with Aspect-preserving MutationSoyeon Park, Wen Xu, Insu Yun, Daehee Jang 等S&P 2020 · 126 次引用
  4. Finding bugs in database systems via query partitioningManuel Rigger, Zhendong SuOOPSLA 2020 · 116 次引用
  5. Detecting optimization bugs in database engines via non-optimizing reference engine constructionManuel Rigger, Zhendong SuFSE 2020 · 104 次引用

相关 Paper

  1. SQUIRREL: Testing Database Management Systems with Language Validity and Coverage FeedbackRui Zhong, Yongheng Chen, Hong Hu, Hangfan Zhang 等CCS 2020 · 5 次引用
  2. Systematically Cover SQL Syntactic Structures via 𝑘-SequenceHongtao Zhou, Yingying Zheng, Yu Gao, Jiansen Song 等ISSTA 2026 · 1 次引用
  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. SmartFuzz: Leveraging Large Language Models and Feature Composition to Generate High-Quality Seeds for Database FuzzingLi Lin, Jintai Hong, Yanlin Zhuang, Rongxin WuOOPSLA 2026
  5. Griffin : Grammar-Free DBMS FuzzingJingzhou Fu, Jie Liang, Zhiyong Wu, Mingzhe Wang 等ASE 2022 · 44 次引用
黄昏的海面,两侧是细线勾勒的悬崖