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

06/03/2020
by   Rui Zhong, et al.
0

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.4x-243.9x higher semantic correctness than state-of-the-art fuzzers, and explores 2.0x-10.9x more new edges than mutation-based tools. These results show that Squirrel is effective in finding memory errors of database management systems.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/14/2022

Investigating Coverage Guided Fuzzing with Mutation Testing

Coverage guided fuzzing (CGF) is an effective testing technique which ha...
research
12/04/2018

Superion: Grammar-Aware Greybox Fuzzing

In recent years, coverage-based greybox fuzzing has proven itself to be ...
research
09/20/2017

FairFuzz: Targeting Rare Branches to Rapidly Increase Greybox Fuzz Testing Coverage

In recent years, fuzz testing has proven itself to be one of the most ef...
research
05/23/2020

Pythia: Grammar-Based Fuzzing of REST APIs with Coverage-guided Feedback and Learning-based Mutations

This paper introduces Pythia, the first fuzzer that augments grammar-bas...
research
06/17/2022

GDsmith: Detecting Bugs in Graph Database Engines

Graph database engines stand out in the era of big data for their effici...
research
02/26/2022

BeDivFuzz: Integrating Behavioral Diversity into Generator-based Fuzzing

A popular metric to evaluate the performance of fuzzers is branch covera...
research
07/05/2023

Fuzzing with Quantitative and Adaptive Hot-Bytes Identification

Fuzzing has emerged as a powerful technique for finding security bugs in...

Please sign up or login with your details

Forgot password? Click here to reset