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

串联和传感器的串约束有效解决(技术报告)

String Constraints with Concatenation and Transducers Solved Efficiently (Technical Report)

Lukas Holik, Petr Janku, Anthony W. Lin, Philipp Rümmer, Tomas Vojnar

摘要:

字符串分析是推理程序如何操作字符串的问题。它有许多应用程序,包括自动检测跨站点脚本(XSS)。流行的字符串分析技术包括符号执行,其核心使用字符串(约束)求解器。这样的求解器通常会推理以字符串理论表达的约束,并将连接运算符作为原子约束。近年来,研究人员开始认识到在串接弦理论中引入替换所有算子和有限转换的重要性。这样的字符串操作通常对于Web应用程序中的XSS漏洞推理至关重要,特别是对消毒功能和隐式浏览器转换(例如innerHTML)进行建模。在本文中,我们提供了第一个字符串求解器,可以原因涉及连接和有限转换的约束。此外,它对几个重要的片段(例如直线片段)具有完整性和终止性保证。在本文中解决的主要挑战是禁止最坏情况下的理论的复杂性。为此,我们提出了一种方法,利用简洁的交替有限自动机作为字符串约束的简洁符号表示。交替不仅在表示换能器的布尔组合时提供了空间上的指数节省,而且还提供了简洁表示换能器和级联的否则昂贵的组合的可能性。关于AFA语言的空性的推理需要在指数大小的图中进行状态空间探索,为此我们使用模型检验算法(例如IC3)。我们已经实现了我们的算法,并证明了它的效力,来自XSS和文献中的其他例子的基准。

英文摘要:

String analysis is the problem of reasoning about how strings are manipulated by a program. It has numerous applications including automatic detection of cross-site scripting (XSS). A popular string analysis technique includes symbolic executions, which at their core use string (constraint) solvers. Such solvers typically reason about constraints expressed in theories over strings with the concatenation operator as an atomic constraint. In recent years, researchers started to recognise the importance of incorporating the replace-all operator and finite transductions in the theories of strings with concatenation. Such string operations are typically crucial for reasoning about XSS vulnerabilities in web applications, especially for modelling sanitisation functions and implicit browser transductions (e.g. innerHTML). In this paper, we provide the first string solver that can reason about constraints involving both concatenation and finite transductions. Moreover, it has a completeness and termination guarantee for several important fragments (e.g. straight-line fragment). The main challenge addressed in the paper is the prohibitive worst-case complexity of the theory. To this end, we propose a method that exploits succinct alternating finite automata as concise symbolic representations of string constraints. Alternation offers not only exponential savings in space when representing Boolean combinations of transducers, but also a possibility of succinct representation of otherwise costly combinations of transducers and concatenation. Reasoning about the emptiness of the AFA language requires a state-space exploration in an exponential-sized graph, for which we use model checking algorithms (e.g. IC3). We have implemented our algorithm and demonstrated its efficacy on benchmarks that are derived from XSS and other examples in the literature.

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

↑