通过歧义分析“Domino”正则表达式中的REDoS检测

Antonina Nikolaevna Nepeivoda, Yulia Andreevna Belikova, Kirill Konstantinovich Shevchenko, Mikhail Romanovich Teriukha, Danila Pavlovich Knyazihin, Aleksandr Dmitrievich Delman, Anna Sergeevna Terentyeva
{"title":"通过歧义分析“Domino”正则表达式中的REDoS检测","authors":"Antonina Nikolaevna Nepeivoda, Yulia Andreevna Belikova, Kirill Konstantinovich Shevchenko, Mikhail Romanovich Teriukha, Danila Pavlovich Knyazihin, Aleksandr Dmitrievich Delman, Anna Sergeevna Terentyeva","doi":"10.15514/ispras-2023-35(3)-8","DOIUrl":null,"url":null,"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.","PeriodicalId":33459,"journal":{"name":"Trudy Instituta sistemnogo programmirovaniia RAN","volume":"34 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"REDoS Detection in “Domino” Regular Expressions by Ambiguity Analysis\",\"authors\":\"Antonina Nikolaevna Nepeivoda, Yulia Andreevna Belikova, Kirill Konstantinovich Shevchenko, Mikhail Romanovich Teriukha, Danila Pavlovich Knyazihin, Aleksandr Dmitrievich Delman, Anna Sergeevna Terentyeva\",\"doi\":\"10.15514/ispras-2023-35(3)-8\",\"DOIUrl\":null,\"url\":null,\"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.\",\"PeriodicalId\":33459,\"journal\":{\"name\":\"Trudy Instituta sistemnogo programmirovaniia RAN\",\"volume\":\"34 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Trudy Instituta sistemnogo programmirovaniia RAN\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.15514/ispras-2023-35(3)-8\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Trudy Instituta sistemnogo programmirovaniia RAN","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.15514/ispras-2023-35(3)-8","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

正则表达式拒绝服务(REDoS)问题是指由于与正则表达式模式匹配字符串的高计算复杂度而导致的时间爆炸。这个问题在流行的正则表达式引擎中很普遍,比如PYTHON、JAVASCRIPT和c++。在本文中,我们研究了几种现有的用于检测REDoS的开源工具,并确定了一类可以在流行的regex引擎中创建REDoS情况的正则表达式,但这些工具无法检测到这些正则表达式。为了解决这一问题,我们提出了一种基于模糊分析的新方法,该方法将强星范式检验与格鲁什科夫自动机轨道的变换模群分析相结合。我们的实验表明,我们的实现在具有多项式匹配复杂度和复杂子表达式重叠结构的正则表达式上优于现有的工具。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
REDoS Detection in “Domino” Regular Expressions by Ambiguity Analysis
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
18
审稿时长
4 weeks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信