Lune

USENIX Security2022顶会

Counting in Regexes Considered Harmful: Exposing ReDoS Vulnerability of Nonbacktracking Matchers

Lenka Turonová, Lukás Holík, Ivan Homoliak, Ondrej Lengál, Margus Veanes, Tomás Vojnar

摘要

In this paper, we study the performance characteristics of nonbacktracking regex matchers and their vulnerability against ReDoS (regular expression denial of service) attacks. We focus on their known Achilles heel, which are extended regexes that use bounded quantifiers (e.g., '(ab)100'). We propose a method for generating input texts that can cause ReDoS attacks on these matchers. The method exploits the bounded repetition and uses it to force expensive simulations of the deterministic automaton for the regex. We perform an extensive experimental evaluation of our and other state-of-the-art Re-DoS generators on a large set of practical regexes with a comprehensive set of backtracking and nonbacktracking matchers, as well as experiments where we demonstrate ReDoS attacks on state-of-the-art real-world security applications containing SNORT with Hyperscan and the HW-accelerated regex matching engine on the NVIDIA BlueField-2 card. Our experiments show that bounded repetition is indeed a notable weakness of nonbacktracking matchers, with our generator being the only one capable of significantly increasing their running time.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Towards Efficient Matching of Regexes with Backreferences using Register Set Automata 引用了 RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted Lookarounds
  • Towards Efficient Matching of Regexes with Backreferences using Register Set Automata 引用了 Towards an Effective Method of ReDoS Detection for Non-backtracking Engines
  • Towards Efficient Matching of Regexes with Backreferences using Register Set Automata 引用了 Regex matching with counting-set automata
  • RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted Lookarounds 引用了 Regex matching with counting-set automata
  • Towards an Effective Method of ReDoS Detection for Non-backtracking Engines 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • PufferDoS: Efficient and Effective Attack String Generation for Regular Expression Denial of Service Vulnerabilities 引用了 Towards an Effective Method of ReDoS Detection for Non-backtracking Engines
  • PufferDoS: Efficient and Effective Attack String Generation for Regular Expression Denial of Service Vulnerabilities 引用了 SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
  • Regex Decision Procedures in Extended RE# 引用了 RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted Lookarounds
  • Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers 引用了 SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. RE#: High Performance Derivative-Based Regex Matching with Intersection, Complement, and Restricted LookaroundsIan Erik Varatalu, Margus Veanes, Juhan P. ErnitsPOPL 2025 · 9 次引用
  2. Towards an Effective Method of ReDoS Detection for Non-backtracking EnginesWeihao Su, Hong Huang, Rongchen Li, Haiming Chen 等USENIX Security 2024 · 4 次引用
  3. Regex Decision Procedures in Extended RE#Ian Erik Varatalu, Margus Veanes, Ekaterina Zhuchko, Juhan P. ErnitsCAV 2025 · 3 次引用
  4. Towards Efficient Matching of Regexes with Backreferences using Register Set AutomataVojtech Havlena, Lukás Holík, Ondrej Lengál, Jan Vasák 等PLDI 2026
  5. PufferDoS: Efficient and Effective Attack String Generation for Regular Expression Denial of Service VulnerabilitiesShangzhi Xu, Ziqi Ding, Xiao Cheng, Yuekang Li 等S&P 2026

它引用的 Paper3

  1. SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity VulnerabilitiesTheofilos Petsios, Jason Zhao, Angelos D. Keromytis, Suman JanaCCS 2017 · 214 次引用
  2. Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web ServersCristian-Alexandru Staicu, Michael PradelUSENIX Security 2018 · 125 次引用
  3. Regex matching with counting-set automataLenka Turonová, Lukás Holík, Ondrej Lengál, Olli Saarikivi 等OOPSLA 2020 · 22 次引用

相关 Paper

  1. ReDoSHunter: A Combined Static and Dynamic Approach for Regular Expression DoS DetectionYeting Li, Zixuan Chen, Jialun Cao, Zhiwu Xu 等USENIX Security 2021 · 20 次引用
  2. Regulator: Dynamic Analysis to Detect ReDoSRobert McLaughlin, Fabio Pagani, Noah Spahn, Christopher Kruegel 等USENIX Security 2022
  3. Regular Expression Denial of Service Induced by BackreferencesYichen Liu, Berk Çakar, Aman Agrawal, Minseok Seo 等USENIX Security 2026
  4. Revealer: Detecting and Exploiting Regular Expression Denial-of-Service VulnerabilitiesYinxi Liu, Mingxue Zhang, Wei MengS&P 2021 · 28 次引用
  5. Effective ReDoS Detection by Principled Vulnerability Modeling and Exploit GenerationXinyi Wang, Cen Zhang, Yeting Li, Zhiwu Xu 等S&P 2023
黄昏的海面,两侧是细线勾勒的悬崖