Rethinking Regex engines to address ReDoS
Rethinking Regex engines to address ReDoS
复制标题
重新思考正则表达式引擎以解决 ReDoS 问题
DOI:
--
复制
发表时间:
2019
期刊:
影响因子:
--
通讯作者:
James C. Davis
中科院分区:
文献类型:
--
作者:
James C. Davis
Regular expressions (regexes) are a powerful string manipulation tool. Unfortunately, in programming languages like Python, Java, and JavaScript, they are unnecessarily dangerous, implemented with worst-case exponential matching behavior. This high time complexity exposes software services to regular expression denial of service (ReDoS) attacks. We propose a data-driven redesign of regex engines, to reflect how regexes are used and what they typically look like. We report that about 95% of regexes in popular programming languages can be evaluated in linear time. The regex engine is a fundamental component of a programming language, and any changes risk introducing compatibility problems. We believe a full redesign is therefore impractical, and so we describe how the vast majority of regex matches can be made linear-time with minor, not major, changes to existing algorithms. Our prototype shows that on a kernel of the regex language, we can trade space for time to make regex matches safe
DOI:
10.1145/3236024.3236072
发表时间:
2018-10
期刊:
Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
影响因子:
--
作者:
Peipei Wang;Kathryn T. Stolee
通讯作者:
Peipei Wang;Kathryn T. Stolee