跳到主要导航 跳到搜索 跳到主要内容

LLM-based Dynamic Differential Testing for Database Connectors with Reinforcement Learning-Guided Prompt Selection

  • Ce Lyu
  • , Yanhao Wang
  • , Jie Liang
  • , Minghao Zhao*
  • *此作品的通讯作者
  • East China Normal University
  • Beihang University

科研成果: 书/报告/会议事项章节 › 会议稿件 › 同行评审

摘要

Database connectors are critical components that enable applications to interact with database management systems (DBMS) but their security vulnerabilities are often neglected. Unlike traditional software defects, connector vulnerabilities exhibit subtle behavioral patterns and are inherently challenging to detect. Moreover, non-standardized implementation of connectors leaves potential risks (i.e., unsafe implementations) but is more elusive. As a result, existing fuzzing methods are ineffective in finding such vulnerabilities. Even large language model (LLM)-based methods are still incapable of generating test cases that can invoke all the interface and internal logic of database connectors due to a lack of domain knowledge.In this paper, we propose a new LLM-based test case generation method guided by reinforcement learning (RL) for database connector testing. Specifically, to equip the LLM with sufficient and appropriate domain knowledge, a parameterized template is composed for prompt construction. The LLM then generates test cases instructed by the constructed prompts, which are dynamically evaluated through differential testing across multiple connectors. The testing process is carried out iteratively, where RL is adopted to select the optimal prompt in each round based on behavioral feedback from the previous rounds, to maximize the efficiency of discovering inconsistencies. Finally, we implement and evaluate the aforementioned methodology on two widely used JDBC connectors, namely MySQL Connector/J and OceanBase Connector/J. In the preliminary results, we have reported 16 bugs, among which 10 are officially confirmed, and the rest are acknowledged as unsafe implementations.

源语言英语
主期刊名Proceedings - 2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025
出版商Institute of Electrical and Electronics Engineers Inc.
页3814-3818
页数5
ISBN(电子版)9798350357332
DOI
出版状态已出版 - 2025
活动2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025 - Seoul, 韩国
期限: 16 11月 2025 → 20 11月 2025

丛书

姓名Proceedings - 2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025

会议

会议2025 40th IEEE/ACM International Conference on Automated Software Engineering, ASE 2025
国家/地区韩国
市Seoul
时期16/11/25 → 20/11/25

学术指纹

探究 'LLM-based Dynamic Differential Testing for Database Connectors with Reinforcement Learning-Guided Prompt Selection' 的科研主题。它们共同构成独一无二的学术指纹。

引用此