Lune

USENIX Security2022顶会

Detecting Logical Bugs of DBMS with Coverage-based Guidance

Yu Liang, Song Liu, Hong Hu

摘要

Database management systems (DBMSs) are critical components of modern data-intensive applications. Developers have adopted many testing techniques to detect DBMS bugs such as crashes and assertion failures. However, most previous efforts cannot detect logical bugs that make the DBMS return incorrect results. Recent work proposed several oracles to identify incorrect results, but they rely on rule-based expression generation to synthesize queries without any guidance. In this paper, we propose to combine coverage-based guidance, validity-oriented mutations and oracles to detect logical bugs in DBMS systems. Specifically, we first design a set of general APIs to decouple the logic of fuzzers and oracles, so that developers can easily port fuzzing tools to test DBMSs and write new oracles for existing fuzzers. Then, we provide validity-oriented mutations to generate high-quality query statements in order to find more logical bugs. Our prototype, SQLRight, outperforms existing tools that only rely on oracles or code coverage. In total, SQLRight detects 18 logical bugs from two well-tested DBMSs, SQLite and MySQL. All bugs have been confirmed and 14 of them have been fixed. 01 CREATE TABLE person (pid INT ); 02 INSERT INTO person VALUES (1) , (10) , (10); 03 CREATE UNIQUE INDEX idx ON person (pid) WHERE pid =1; 04 SELECT DISTINCT pid FROM person WHERE pid =10; 05 --output : 10 n10 06 --expect : 10 CREATE TABLE person (pid INT ); INSERT INTO person VALUES (1) , (10) , (10); SELECT DISTINCT pid FROM person WHERE pid =10; Listing 2: A functional-equivalent query of Listing 1 query by deleting the CREATE UNIQUE INDEX statement. 01 CREATE TABLE v0 (v1 TEXT ); 02 INSERT INTO v0 VALUES ('text '); 03 SELECT v1 FROM 'v0 ';

问 Lune

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

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

已有 32 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing 引用了 CollAFL: Path Sensitive Fuzzing
  • 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
  • Keep It Simple: Testing Databases via Differential Query Plans 引用了 Testing Database Engines via Query Plan Guidance
  • REDQUEEN: Fuzzing with Input-to-State Correspondence 引用了 CollAFL: Path Sensitive Fuzzing
  • REDQUEEN: Fuzzing with Input-to-State Correspondence 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
  • REDQUEEN: Fuzzing with Input-to-State Correspondence 引用了 Angora: Efficient Fuzzing by Principled Search
  • Testing Database Systems via Differential Query Execution 引用了 Testing Database Engines via Query Plan Guidance
  • Testing Database Systems via Differential Query Execution 引用了 Detecting Isolation Bugs via Transaction Oracle Construction
  • Detecting Isolation Bugs via Transaction Oracle Construction 引用了 Testing Database Systems via Differential Query Execution
  • Detecting Isolation Bugs via Transaction Oracle Construction 引用了 Testing Database Engines via Query Plan Guidance
  • Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation 引用了 Testing Database Systems via Differential Query Execution
  • Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation 引用了 Testing Database Engines via Query Plan Guidance
  • Angora: Efficient Fuzzing by Principled Search 引用了 Driller: Augmenting Fuzzing Through Selective Symbolic Execution
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper32

  1. Testing Database Engines via Query Plan GuidanceJinsheng Ba, Manuel RiggerICSE 2023 · 39 次引用
  2. Testing Database Systems via Differential Query ExecutionJiansen Song, Wensheng Dou, Ziyu Cui, Qianwang Dai 等ICSE 2023 · 26 次引用
  3. Keep It Simple: Testing Databases via Differential Query PlansJinsheng Ba, Manuel RiggerSIGMOD 2024 · 23 次引用
  4. Detecting Logic Bugs in Database Engines via Equivalent Expression TransformationZu-Ming Jiang, Zhendong SuOSDI 2024 · 22 次引用
  5. Detecting Isolation Bugs via Transaction Oracle ConstructionWensheng Dou, Ziyu Cui, Qianwang Dai, Jiansen Song 等ICSE 2023 · 21 次引用

它引用的 Paper23

  1. Driller: Augmenting Fuzzing Through Selective Symbolic ExecutionNick Stephens, John Grosen, Christopher Salls, Andrew Dutcher 等NDSS 2016 · 1,021 次引用
  2. Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 次引用
  3. QSYM : A Practical Concolic Execution Engine Tailored for Hybrid FuzzingInsu Yun, Sangho Lee, Meng Xu, Yeongjin Jang 等USENIX Security 2018 · 537 次引用
  4. CollAFL: Path Sensitive FuzzingShuitao Gan, Chao Zhang, Xiaojun Qin, Xuwen Tu 等S&P 2018 · 426 次引用
  5. REDQUEEN: Fuzzing with Input-to-State CorrespondenceCornelius Aschermann, Sergej Schumilo, Tim Blazytko, Robert Gawlik 等NDSS 2019 · 413 次引用

相关 Paper

  1. Pinolo: Detecting Logical Bugs in Database Management Systems with Approximate Query SynthesisZongyin Hao, Quanfeng Huang, Chengpeng Wang, Jianfeng Wang 等USENIX ATC 2023 · 26 次引用
  2. SQUIRREL: Testing Database Management Systems with Language Validity and Coverage FeedbackRui Zhong, Yongheng Chen, Hong Hu, Hangfan Zhang 等CCS 2020 · 5 次引用
  3. Detecting Metadata-Related Logic Bugs in Database Systems via Raw Database ConstructionJiansen Song, Wensheng Dou, Yu Gao, Ziyu Cui 等VLDB 2024 · 13 次引用
  4. ValScope: Value-Semantics-Aware Metamorphic Testing for Detecting Logical Bugs in DBMSsLi Lin, Liehang Chen, Rongxin WuOSDI 2026
  5. Constant Optimization Driven Database System TestingChi Zhang, Manuel RiggerSIGMOD 2025 · 8 次引用
黄昏的海面,两侧是细线勾勒的悬崖