arXiv:2411.05540cs.SEcs.AI2024-11被引 2

用因果变分自编码修复系统漏洞,修复率高达52%。

CRepair: CVAE-based Automatic Vulnerability Repair Technology

  • 基于提示预处理与因果推断,精准捕捉漏洞特征
  • 多样本特征融合提升修复多样性,修复率达52%
  • 适合安全研究者与自动化修复工具开发者参考

软件漏洞是威胁现代软件完整性、安全性与可靠性的重大隐患,常导致各行业巨额经济损失。人工修复耗时且易出错。现有基于学习的自动修复方法多聚焦于增加漏洞数据,忽视代码特征多样性,且定位不精准。本文提出CRepair,一种基于条件变分自编码器(CVAE)的自动漏洞修复技术。首先采用提示驱动方法预处理漏洞数据;接着利用因果推断将漏洞特征映射为概率分布;通过多样本特征融合捕获多样化的漏洞特征信息;最后使用条件控制引导模型修复。实验表明,该方法显著优于基准模型,在多个评估维度上实现52%的完美修复率,验证了其有效性,推动了AI驱动的代码漏洞修复发展,具备广阔应用前景。

原文摘要 · Abstract (English)

Software vulnerabilities are flaws in computer software systems that pose significant threats to the integrity, security, and reliability of modern software and its application data. These vulnerabilities can lead to substantial economic losses across various industries. Manual vulnerability repair is not only time-consuming but also prone to errors. To address the challenges of vulnerability repair, researchers have proposed various solutions, with learning-based automatic vulnerability repair techniques gaining widespread attention. However, existing methods often focus on learning more vulnerability data to improve repair outcomes, while neglecting the diverse characteristics of vulnerable code, and suffer from imprecise vulnerability localization.To address these shortcomings, this paper proposes CRepair, a CVAE-based automatic vulnerability repair technology aimed at fixing security vulnerabilities in system code. We first preprocess the vulnerability data using a prompt-based method to serve as input to the model. Then, we apply causal inference techniques to map the vulnerability feature data to probability distributions. By employing multi-sample feature fusion, we capture diverse vulnerability feature information. Finally, conditional control is used to guide the model in repairing the vulnerabilities.Experimental results demonstrate that the proposed method significantly outperforms other benchmark models, achieving a perfect repair rate of 52%. The effectiveness of the approach is validated from multiple perspectives, advancing AI-driven code vulnerability repair and showing promising applications.

漏洞修复变分自编码因果推断AI安全

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