C语言缓冲区溢出分析
Buffer Overflow Analysis for C
摘要:
缓冲区溢出的检测和缓解一直是C程序的一个重要问题。本文定义了一种C程序的字符串缓冲区溢出分析方法。我们制定的关键思想是(a)分离缓冲区的指针指向他们,(b)建模缓冲区的大小和位置的空字符集,(c)定义无状态函数来计算空位置集和缓冲区和指针之间的映射。这个练习已经进行了测试的可行性,描述这样的分析格值函数和关系,以方便自动构建的分析器,而无需用户编写C/C++/Java代码。这是通过设计无状态的公式化来促进的,因为有状态的公式化通过状态中的副作用来组合功能,从而自然地要求编写C/C++/Java代码来描述它们。鉴于上述动机,本文的重点是不建立良好的静态近似缓冲区溢出分析,但要显示如何给定的静态近似可以正式的无状态配方,使他们成为服从自动建设的分析。
英文摘要:
Buffer overflow detection and mitigation for C programs has been an important concern for a long time. This paper defines a string buffer overflow analysis for C programs. The key ideas of our formulation are (a) separating buffers from the pointers that point to them, (b) modelling buffers in terms of sizes and sets of positions of null characters, and (c) defining stateless functions to compute the sets of null positions and mappings between buffers and pointers. This exercise has been carried out to test the feasibility of describing such an analysis in terms of lattice valued functions and relations to facilitate automatic construction of an analyser without the user having to write C/C++/Java code. This is facilitated by devising stateless formulations because stateful formulations combine features through side effects in states raising a natural requirement of C/C++/Java code to be written to describe them. Given the above motivation, the focus of this paper is not to build good static approximations for buffer overflow analysis but to show how given static approximations could be formalized in terms of stateless formulations so that they become amenable to automatic construction of analysers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。