arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.01438cs.PL
收藏

使用符号执行的输入验证

Input Validation with Symbolic Execution

Anay Mehrotra, Ayush Bansal, Awanish Pandey, Subhajit Roy

摘要:

符号执行一直被无法处理需要高度结构化输入的程序所困扰。大多数情况下,符号执行引擎会被大量的不可行路径压垮,无法探索足够的可行路径来获得任何可观的覆盖率。在本文中,我们提出了一个系统,InVaSion,试图解决这个问题的分叉为基础的符号执行引擎。我们提出了一种输入规约语言(ISL),它是基于有限状态自动机,但包括保护过渡,一组寄存器和一组命令更新寄存器状态。我们证明,我们的语言是表达能力足以处理复杂的输入规范,如Tiff图像格式,而不需要大量的人力,甚至Tiff图像规范可以指定在我们的语言与约35个国家的自动机。InVaSion将给定的程序和输入规范转换为非确定性程序,并使用符号执行来实例化非确定性。这使得我们的工具可以与任何基于分叉的符号执行引擎一起工作,并且不需要任何特殊的理论求解器。在我们的一组基准中,平均而言,InVaSion能够将分支机构覆盖率从基线KLEE的24.97%提高到67.84%。

英文摘要:

Symbolic execution has always been plagued by the inability to handle programs that require highly structured inputs. Most often, the symbolic execution engine gets overwhelmed by the sheer number of infeasible paths and fails to explore enough feasible paths to gain any respectable coverage. In this paper, we propose a system, InVaSion, that attempts to solve this problem for forking-based symbolic execution engines. We propose an input specification language (ISL) that is based on a finite-state automaton but includes guarded transitions, a set of registers and a set of commands to update the register states. We demonstrate that our language is expressive enough to handle complex input specifications, like the Tiff image format, while not requiring substantial human effort; even the Tiff image specification could be specified in our language with an automaton of about 35 states. InVaSion translates the given program and the input specification into a non-deterministic program and uses symbolic execution to instantiate the non-determinism. This allows our tool to work with any forking-based symbolic execution engine and with no requirement of any special theory solver. Over our set of benchmarks, on an average, InVaSion was able to increase branch coverage from 24.97% to 67.84% over baseline KLEE.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑