arXiv:2606.28403cs.SEcs.AI2026-06综述

用强化学习检测C++代码漏洞,发现现有方法多用于模糊测试,少有直接定位漏洞。

Reinforcement Learning for Software Vulnerability Analysis: A Systematic Review with Emphasis on C/C++ Source Code and Static Analysis

论文配图:Reinforcement Learning for Software Vulnerability Analysis: A Systematic Review with Emphasis on C/C++ Source Code and Static Analysis
图 1 · 摘自论文原文
  • 以强化学习构建智能探测器,通过状态-动作-奖励机制探索代码路径
  • 21项研究中仅3篇直接检测漏洞,1篇实现语句级定位
  • 当前缺乏基于控制流图的源码状态表示,是主要研究空白

由于代码复杂性、手动内存管理及传统静态分析的局限性,C/C++软件漏洞检测仍是重大安全挑战。强化学习(RL)近年来在模糊测试、测试生成、程序探索以及漏洞检测与定位方面展现出潜力。本研究遵循PRISMA 2020指南,系统回顾了2015至2026年间发表于主流数据库的21项相关研究,聚焦于C/C++源码与静态分析。我们分析了任务类型、算法选择、状态-动作-奖励-环境设定、代码表示方式、数据集与评估指标。结果表明:15项研究关注模糊测试与引导式探索,仅3项涉及直接漏洞检测,1项实现语句级定位。此外,控制流图(CFG)和抽象语法树(AST)等静态提取的结构化表示极少被用作智能体状态,且现有基准缺乏可比性。本文提出面向任务与形式化的分类体系,并指出关键研究空白:尚无使用源码CFG作为状态的强化学习代理来实现漏洞检测与定位。

原文摘要 · Abstract (English)

Vulnerability detection in C/C++ software remains a major security challenge due to code complexity, manual memory management, and the limitations of traditional static analysis. Reinforcement Learning (RL) has emerged as a promising approach, particularly for fuzzing, test generation, program exploration, and, more recently, vulnerability detection and localization. Following PRISMA 2020 guidelines, this work reviews RL techniques for software vulnerability analysis, focusing on C/C++ source code and static analysis. We identified 21 primary studies published between 2015 and 2026 from major scientific databases and complementary searches. We analyze the addressed tasks, algorithms, state-action-reward-environment formulations, code representations, datasets, and evaluation metrics. Results show that 15 studies focus on fuzzing and guided exploration, only 3 on direct vulnerability detection, and just 1 on statement-level localization. Moreover, statically extracted structural representations such as Control Flow Graphs (CFGs) and Abstract Syntax Trees (ASTs) are rarely used as agent states, and benchmarks lack comparability. We propose a task- and formulation-oriented taxonomy and identify a key research gap: the absence of RL agents that use source-code CFGs as states to detect and localize vulnerable nodes.

强化学习漏洞检测静态分析C++安全

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。