USENIX Security2022Top-tier venue
Detecting Logical Bugs of DBMS with Coverage-based Guidance
Yu Liang, Song Liu, Hong Hu
Abstract
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 ';
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.
32 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid Fuzzing cites CollAFL: Path Sensitive Fuzzing
- 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
- Keep It Simple: Testing Databases via Differential Query Plans cites Testing Database Engines via Query Plan Guidance
- REDQUEEN: Fuzzing with Input-to-State Correspondence cites CollAFL: Path Sensitive Fuzzing
- REDQUEEN: Fuzzing with Input-to-State Correspondence cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
- REDQUEEN: Fuzzing with Input-to-State Correspondence cites Angora: Efficient Fuzzing by Principled Search
- Testing Database Systems via Differential Query Execution cites Testing Database Engines via Query Plan Guidance
- Testing Database Systems via Differential Query Execution cites Detecting Isolation Bugs via Transaction Oracle Construction
- Detecting Isolation Bugs via Transaction Oracle Construction cites Testing Database Systems via Differential Query Execution
- Detecting Isolation Bugs via Transaction Oracle Construction cites Testing Database Engines via Query Plan Guidance
- Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation cites Testing Database Systems via Differential Query Execution
- Detecting Logic Bugs in Database Engines via Equivalent Expression Transformation cites Testing Database Engines via Query Plan Guidance
- Angora: Efficient Fuzzing by Principled Search cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
Cited by top-tier papers32
- Testing Database Engines via Query Plan GuidanceJinsheng Ba, Manuel RiggerICSE 2023 · 39 citations
- Testing Database Systems via Differential Query ExecutionJiansen Song, Wensheng Dou, Ziyu Cui, Qianwang Dai et al.ICSE 2023 · 26 citations
- Keep It Simple: Testing Databases via Differential Query PlansJinsheng Ba, Manuel RiggerSIGMOD 2024 · 23 citations
- Detecting Logic Bugs in Database Engines via Equivalent Expression TransformationZu-Ming Jiang, Zhendong SuOSDI 2024 · 22 citations
- Detecting Isolation Bugs via Transaction Oracle ConstructionWensheng Dou, Ziyu Cui, Qianwang Dai, Jiansen Song et al.ICSE 2023 · 21 citations
Builds on23
- Driller: Augmenting Fuzzing Through Selective Symbolic ExecutionNick Stephens, John Grosen, Christopher Salls, Andrew Dutcher et al.NDSS 2016 · 1,021 citations
- Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 citations
- QSYM : A Practical Concolic Execution Engine Tailored for Hybrid FuzzingInsu Yun, Sangho Lee, Meng Xu, Yeongjin Jang et al.USENIX Security 2018 · 537 citations
- CollAFL: Path Sensitive FuzzingShuitao Gan, Chao Zhang, Xiaojun Qin, Xuwen Tu et al.S&P 2018 · 426 citations
- REDQUEEN: Fuzzing with Input-to-State CorrespondenceCornelius Aschermann, Sergej Schumilo, Tim Blazytko, Robert Gawlik et al.NDSS 2019 · 413 citations
Related papers
- Pinolo: Detecting Logical Bugs in Database Management Systems with Approximate Query SynthesisZongyin Hao, Quanfeng Huang, Chengpeng Wang, Jianfeng Wang et al.USENIX ATC 2023 · 26 citations
- SQUIRREL: Testing Database Management Systems with Language Validity and Coverage FeedbackRui Zhong, Yongheng Chen, Hong Hu, Hangfan Zhang et al.CCS 2020 · 5 citations
- 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
- ValScope: Value-Semantics-Aware Metamorphic Testing for Detecting Logical Bugs in DBMSsLi Lin, Liehang Chen, Rongxin WuOSDI 2026
- Constant Optimization Driven Database System TestingChi Zhang, Manuel RiggerSIGMOD 2025 · 8 citations
