<p>With the widespread use of system software (such as operating systems, compilers, etc.), buffer overflow vulnerabilities have become one of the most common types of vulnerabilities. Due to their dynamics, diversity, and inherent complexity, detecting buffer overflow vulnerabilities has always been a major challenge in the field of software security. To address this issue, this study proposes a buffer overflow vulnerability detection method based on dependency analysis and LLM Chain-of-Thought (COT), named GPTDetector. By performing static analysis on C/C++ programs, GPTDetector can track the data dependencies and control dependencies of specific sensitive information (i.e., threat code) and generate carefully designed prompts for vulnerability detection, thereby helping LLMs infer and identify potential buffer overflow vulnerabilities. Experimental results show that GPTDetector significantly outperforms traditional models in detecting vulnerabilities in the source code of real-world projects, with an F1 score increased by 7.3%-14.6%.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Towards combining chain-of-thought and code static analysis for buffer overflow vulnerability detection

  • Yuan Huang,
  • Yinan Chen,
  • Jiahong Cai,
  • Junlong Wu,
  • Xiangping Chen,
  • Pengfei Shen,
  • Lei Yun

摘要

With the widespread use of system software (such as operating systems, compilers, etc.), buffer overflow vulnerabilities have become one of the most common types of vulnerabilities. Due to their dynamics, diversity, and inherent complexity, detecting buffer overflow vulnerabilities has always been a major challenge in the field of software security. To address this issue, this study proposes a buffer overflow vulnerability detection method based on dependency analysis and LLM Chain-of-Thought (COT), named GPTDetector. By performing static analysis on C/C++ programs, GPTDetector can track the data dependencies and control dependencies of specific sensitive information (i.e., threat code) and generate carefully designed prompts for vulnerability detection, thereby helping LLMs infer and identify potential buffer overflow vulnerabilities. Experimental results show that GPTDetector significantly outperforms traditional models in detecting vulnerabilities in the source code of real-world projects, with an F1 score increased by 7.3%-14.6%.