高级检索

    基于大语言模型的数据库管理系统模糊测试方法

    Large Language Model Based Fuzz Testing Approach for Database Management System

    • 摘要: 数据库管理系统(Database Management System,DBMS)作为数据管理与存储的关键软件,其可靠性直接影响数据密集型系统的安全稳定运行。近年来,模糊测试因其具备人工成本低、测试效率高等特点,成为DBMS测试方法之一。然而现有的DBMS模糊测试方法面临测试用例覆盖能力不足与多DBMS适配性差两大问题,限制了测试的效果和泛用性。为此,CLCC(Curated LLM Case Construct)是一种基于大语言模型(Large Language Model,LLM)的DBMS模糊测试方法。该方法在模糊测试前,利用LLM对初始种子进行构建,并在模糊测试过程中,根据边覆盖情况筛选种子,引导LLM生成测试用例。与SQUIRREL、SQLRight和ParserFuzz进行的对比实验表明,CLCC测试SQLite、MySQL、MariaDB、DuckDB和PostgreSQL的边覆盖数量比SQUIRREL增加了14.96~49.31%;测试SQLite、MySQL和PostgreSQL的边覆盖数量比SQLRight增加了6.09%~17.10%;测试SQLite、MySQL和MariaDB的边覆盖数量比ParserFuzz增加了17.95~41.20%。

       

      Abstract: Database Management Systems (DBMSs), as fundamental software for data management and storage, are critical to ensuring the security, reliability and stability of modern data-intensive applications. In recent years, fuzz testing has been increasingly adopted for DBMS validation owing to its low manual cost, high efficiency, and capability of automatically exercising diverse execution paths. However, existing DBMS fuzzing approaches remain constrained by insufficient test case coverage and limited adaptability across heterogeneous DBMS implementations, which substantially weaken their effectiveness and generality. CLCC (Curated LLM Case Construct) is a novel test case generation approach for DBMS fuzzing based on a Large Language Model (LLM). In CLCC, LLMs are employed to construct high-quality initial seeds prior to fuzzing, while edge coverage-guided seed selection is incorporated during fuzzing to steer LLM-driven test case generation. Extensive comparative experiments demonstrate that CLCC achieves 14.96%-49.31% higher edge coverage on SQLite, MySQL, MariaDB, DuckDB and PostgreSQL compared with SQUIRREL, delivers 6.09%-17.10% improvements on SQLite, MySQL and PostgreSQL relative to SQLRight, and provides 17.95%-41.20% gains on SQLite, MySQL and MariaDB over ParserFuzz.

       

    /

    返回文章
    返回