Traditional database fuzzing techniques primarily focus on syntactic correctness and general SQL structures, leaving critical yet obscure DBMS features, such as system-level modes (e.g., GTID), programmatic constructs (e.g., PROCEDURE), advanced process commands (e.g., KILL), largely underexplored. Although rarely triggered by typical inputs, these features can lead to severe crashes or security issues when executed under edge-case conditions. In this paper, we present FuzzySQL, a novel LLM-powered adaptive fuzzing framework designed to uncover subtle vulnerabilities in DBMS special features. FuzzySQL combines grammar-guided SQL generation with logic-shifting progressive mutation, a novel technique that explores alternative control paths by negating conditions and restructuring execution logic, synthesizing structurally and semantically diverse test cases. To further ensure deeper execution coverage of the back end, FuzzySQL employs a hybrid error repair pipeline that unifies rule-based patching with LLM-driven semantic repair, enabling automatic correction of syntactic and context-sensitive failures. We evaluate FuzzySQL across multiple DBMSs, including MySQL, MariaDB, SQLite, PostgreSQL and Clickhouse, uncovering 37 vulnerabilities, 7 of which are tied to under-tested DBMS special features. As of this writing, 29 cases have been confirmed with 9 assigned CVE identifiers, 14 already fixed by vendors, and additional vulnerabilities scheduled to be patched in upcoming releases. Our results highlight the limitations of conventional fuzzers in semantic feature coverage and demonstrate the potential of LLM-based fuzzing to discover deeply hidden bugs in complex database systems.


翻译:传统的数据库模糊测试技术主要关注语法正确性和通用SQL结构,使得许多关键但晦涩的数据库管理系统功能,如系统级模式(例如GTID)、程序化构造(例如PROCEDURE)、高级进程命令(例如KILL)在很大程度上未被充分探索。尽管这些功能很少被典型输入触发,但在边界条件下执行时可能导致严重的崩溃或安全问题。本文提出FuzzySQL,一种新颖的基于大语言模型的自适应模糊测试框架,旨在揭示数据库管理系统特殊功能中的细微漏洞。FuzzySQL结合了语法引导的SQL生成与逻辑转换渐进式变异——一种通过否定条件和重构执行逻辑来探索替代控制路径的新技术,从而合成结构和语义多样化的测试用例。为了进一步确保后端更深层次的执行覆盖,FuzzySQL采用了一种混合错误修复流程,统一了基于规则的修补与大语言模型驱动的语义修复,能够自动纠正语法和上下文相关的错误。我们在多个数据库管理系统(包括MySQL、MariaDB、SQLite、PostgreSQL和Clickhouse)上评估FuzzySQL,共发现37个漏洞,其中7个与测试不足的数据库管理系统特殊功能相关。截至本文撰写时,已有29个案例得到确认,其中9个被分配了CVE标识,14个已被供应商修复,其余漏洞计划在后续版本中修补。我们的研究结果突显了传统模糊测试在语义功能覆盖方面的局限性,并展示了基于大语言模型的模糊测试在发现复杂数据库系统中深度隐藏缺陷方面的潜力。

0
下载
关闭预览

相关内容

数据库( Database )或数据库管理系统( Database management systems )是按照数据结构来组织、存储和管理数据的仓库。目前数据管理不再仅仅是存储和管理数据,而转变成用户所需要的各种数据管理的方式。
大型语言模型系统中提示缺陷的分类学
专知会员服务
8+阅读 · 2025年9月19日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
《大型语言模型(LLMs): 训练到推理》全面概述技术细节
专知会员服务
27+阅读 · 2021年10月12日
Web渗透测试Fuzz字典分享
黑白之道
21+阅读 · 2019年5月22日
你的算法可靠吗? 神经网络不确定性度量
专知
40+阅读 · 2019年4月27日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
NLP通用模型诞生?一个模型搞定十大自然语言常见任务
人工智能头条
10+阅读 · 2018年6月29日
展望:模型驱动的深度学习
人工智能学家
12+阅读 · 2018年1月23日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员