|
REDoS detection in “Domino” regular expressions by Ambiguity Analysis
A. N. Nepeivodaa, Yu. A. Belikovab, K. K. Shevchenkob, M. R. Teriukhab, D. P. Knyazihinb, A. D. Delmanb, A. S. Terentyevab a Ailamazyan Program Systems Institute of Russian Academy of Sciences
b Bauman Moscow State Technical University
Abstract:
The Regular Expression Denial of Service (REDoS) problem refers to a time explosion caused by the high computational complexity of matching a string against a regex pattern. This issue is prevalent in popular regex engines, such as Python, JavaScript, and C++. In this paper, we examine several existing open-source tools for detecting REDoS and identify a class of regexes that can create REDoS situations in popular regex engines but are not detected by these tools. To address this gap, we propose a new approach based on ambiguity analysis, which combines a strong star-normal form test with an analysis of the transformation monoids of Glushkov automata orbits. Our experiments demonstrate that our implementation outperforms the existing tools on regexes with polynomial matching complexity and complex subexpression overlap structures.
Keywords:
regular expressions, ambiguity, REDoS, Glushkov automaton, transformation monoid, strong star-normal form
Citation:
A. N. Nepeivoda, Yu. A. Belikova, K. K. Shevchenko, M. R. Teriukha, D. P. Knyazihin, A. D. Delman, A. S. Terentyeva, “REDoS detection in “Domino” regular expressions by Ambiguity Analysis”, Proceedings of ISP RAS, 35:3 (2023), 109–124
Linking options:
https://www.mathnet.ru/eng/tisp790 https://www.mathnet.ru/eng/tisp/v35/i3/p109
|
Statistics & downloads: |
Abstract page: | 44 | Full-text PDF : | 20 |
|