首页 | 本学科首页   官方微博 | 高级检索  
     

一种基于代码静态分析的缓冲区溢出检测算法
引用本文:王雅文,姚欣洪,宫云战,杨朝红.一种基于代码静态分析的缓冲区溢出检测算法[J].计算机研究与发展,2012,49(4):839-845.
作者姓名:王雅文  姚欣洪  宫云战  杨朝红
作者单位:1. 北京邮电大学网络与交换技术国家重点实验室 北京100876
2. 装甲兵工程学院信息工程系 北京 100072
基金项目:国家“八六三”高技术研究发展计划基金项目(2009AA012404);国家自然科学基金项目(91018002)
摘    要:缓冲区溢出目前已成为最常见的软件安全漏洞之一,从源代码形式来看,常见的缓冲区溢出漏洞主要有两种类型:数据拷贝和格式化字符串造成的缓冲区溢出.分析了常见缓冲区溢出漏洞发生的原因,给出了格式化字符串存储长度的计算方法,介绍了一种基于源代码静态分析的缓冲区溢出检测算法,该算法首先对源代码进行建模,构造其抽象语法树、符号表、控制流图、函数调用图,在此基础上运用区间运算技术来分析和计算程序变量及表达式的取值范围,并在函数间分析中引入函数摘要来代替实际的函数调用.最后使用该方法对开源软件项目进行检测,结果表明该方法能够有效地、精确地检测缓冲区溢出.

关 键 词:安全漏洞  缓冲区溢出  静态分析  区间运算  函数摘要

A Method of Buffer Overflow Detection Based on Static Code Analysis
Wang Yawen , Yao Xinhong , Gong Yunzhan , Yang Zhaohong.A Method of Buffer Overflow Detection Based on Static Code Analysis[J].Journal of Computer Research and Development,2012,49(4):839-845.
Authors:Wang Yawen  Yao Xinhong  Gong Yunzhan  Yang Zhaohong
Affiliation:1(State Key Laboratory of Networking and Switching Technology(Beijing University of Posts and Telecommunications),Beijing 100876)2(Department of Information Engineering,Academy of Armored Force Engineering,Beijing 100072)
Abstract:With the Internet advances further,people pay more and more attention to information security.Particularly,buffer overflow has become one of the best-known software security vulnerabilities.In terms of source code,software security vulnerabilities can be caused in two ways,data-copy-related and format-control-string-related function calls.This paper summarizes the common functions which are prone to risk buffer overflows,and introduces an algorithm of how to compute the length of formatted string variables when calling the formatted input output functions.It also proposes a method of buffer overflow detection based on static code analysis.The detection method models the source code firstly by creating its Abstract syntax tree,symbol table,control flow graph and function call graph.Based on these models,the value range of variables and expressions in each program point is computed by interval calculation,and when encountering a function call,the function’s summary is applied as a stand-in for the function.This method is scalable by allowing user to add functions under test in configure files.Experiments on open source project show that it would detect buffer overflow efficiently,and its output has both a lower false positive rate and a lower false negative rate than another testing tool,Klocwork K8.
Keywords:security vulnerabilities  buffer overflow  static analysis  interval calculation  function summary
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号