复杂操作字符串操作程序路径可行性的判定方法
Decision Procedures for Path Feasibility of String-Manipulating Programs with Complex Operations
摘要:
字符串操作程序中路径可行性检测决策过程的设计与实现是一个重要的问题,其应用包括符号执行和跨站脚本(XSS)漏洞的自动检测。(符号)路径是赋值和断言的有限序列(即没有循环),并且检查其可行性相当于确定产生成功执行的输入的存在。我们给出了两个一般的语义条件,共同确保路径可行性的可判定性:(1)每个断言承认定期一元分解,(2)每个分配使用(可能是不确定的)函数,其逆关系保持规律性。我们表明,这些条件是表达,因为他们是由众多的字符串操作满足。他们也严格地支持现有的可判定弦理论和大多数现有的基准(例如卡鲁扎的大部分,以及所有的Slove,Stranger和Sloth)。我们给出了一个简单的决策过程和一个可扩展的体系结构的字符串求解器中,用户可以很容易地将他/她自己的字符串函数。我们发现一般的片段有一个紧密的,但高的复杂性。为了解决这个问题,我们建议只允许部分字符串函数(即,禁止非确定性)在条件(2)中。当需要非确定性函数时,我们还提供了一个语法片段,它提供了对非确定性函数的支持,但可以简化为现有的求解器SLOTH。我们提供了一个有效的实现我们的决定过程中确定性的部分字符串函数在一个新的字符串求解器OSTRICH。它提供了对串联、反向、函数转换器和replaceall的内置支持,并提供了一个可扩展的框架,以支持更多的字符串函数。我们证明了我们的新求解器对其他竞争对手的求解器的功效。
英文摘要:
The design and implementation of decision procedures for checking path feasibility in string-manipulating programs is an important problem, whose applications include symbolic execution and automated detection of cross-site scripting (XSS) vulnerabilities. A (symbolic) path is a finite sequence of assignments and assertions (i.e. without loops), and checking its feasibility amounts to determining the existence of inputs that yield a successful execution. We give two general semantic conditions which together ensure the decidability of path feasibility: (1) each assertion admits regular monadic decomposition, and (2) each assignment uses a (possibly nondeterministic) function whose inverse relation preserves regularity. We show these conditions are expressive since they are satisfied by a multitude of string operations. They also strictly subsume existing decidable string theories, and most existing benchmarks (e.g. most of Kaluza's, and all of SLOG's, Stranger's, and SLOTH's). We give a simple decision procedure and an extensible architecture of a string solver in that a user may easily incorporate his/her own string functions. We show the general fragment has a tight, but high complexity. To address this, we propose to allow only partial string functions (i.e., prohibit nondeterminism) in condition (2). When nondeterministic functions are needed, we also provide a syntactic fragment that provides a support of nondeterministic functions but can be reduced to an existing solver SLOTH. We provide an efficient implementation of our decision procedure for deterministic partial string functions in a new string solver OSTRICH. It provides built-in support for concatenation, reverse, functional transducers, and replaceall and provides a framework for extensibility to support further string functions. We demonstrate the efficacy of our new solver against other competitive solvers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。