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

10/29/2020
by   Lukas Holik, et al.
0

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.

READ FULL TEXT
research
12/11/2021

CertiStr: A Certified String Solver (technical report)

Theories over strings are among the most heavily researched logical theo...
research
11/09/2017

What Is Decidable about String Constraints with the ReplaceAll Function

Recently, it was shown that any theory of strings containing the string-...
research
07/14/2020

A Decision Procedure for Path Feasibility of String Manipulating Programs with Integer Data Type

Strings are widely used in programs, especially in web applications. Int...
research
03/02/2023

A Symbolic Algorithm for the Case-Split Rule in Solving Word Constraints with Extensions (Technical Report)

Case split is a core proof rule in current decision procedures for the t...
research
11/07/2018

Decision Procedures for Path Feasibility of String-Manipulating Programs with Complex Operations

The design and implementation of decision procedures for checking path f...
research
07/31/2023

Decision Procedures for Sequence Theories (Technical Report)

Sequence theories are an extension of theories of strings with an infini...
research
05/01/2010

The Exact Closest String Problem as a Constraint Satisfaction Problem

We report (to our knowledge) the first evaluation of Constraint Satisfac...

Please sign up or login with your details

Forgot password? Click here to reset