paperbot · PL 论文追踪

全部论文 待读 收藏

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

基于LLM与强化学习引导提示选择的数据库连接器动态差分测试
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 3/10 · 论文将LLM与强化学习结合用于数据库连接器的动态差分测试,属于LLM辅助软件测试,但并非用户关注的静态分析、形式化验证、浮点或贝叶斯程序分析方向,与“PL→AI”及“AI→PL”的核心交集较弱。引用 1 inbox
Ce Lyu, Yanhao Wang, Jie Liang, Minghao Zhao
crossref: 2026-09-12

AI 速览

一句话:提出用强化学习引导提示选择,让LLM生成用例对数据库连接器进行动态差分测试,以发现不一致与漏洞。

数据库连接器是应用与DBMS交互的关键组件,但其安全漏洞常被忽视:漏洞行为模式细微、实现不规范,现有fuzzing和LLM方法因缺乏领域知识难以覆盖接口与内部逻辑。本文提出基于LLM并由强化学习引导的测试用例生成方法:先用参数化模板构造包含领域知识的提示,LLM据此生成测试用例,再在多个连接器间进行动态差分测试;整个流程迭代执行,RL根据前几轮的行为反馈选择最优提示,以最大化发现不一致的效率。作者在MySQL Connector/J和OceanBase Connector/J上初步评估,报告16个bug,其中10个被官方确认,其余被承认为不安全实现。

问题
数据库连接器的安全漏洞隐蔽且实现非标准化,现有fuzzing与LLM方法难以生成能覆盖其接口和内部逻辑的测试用例。
方法
提出参数化模板构造领域知识提示,LLM生成测试用例,并通过跨多个连接器的动态差分测试获得行为反馈;采用强化学习迭代选择最优提示。
评估
在MySQL Connector/J和OceanBase Connector/J上初步评估,报告16个bug,其中10个被官方确认,其余被承认为不安全实现。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9445,
  title = {LLM-based Dynamic Differential Testing for Database Connectors with Reinforcement Learning-Guided Prompt Selection},
  author = {Ce Lyu and Yanhao Wang and Jie Liang and Minghao Zhao},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00322}
}