Lune

ASE2020顶会

FlashRegex: Deducing Anti-ReDoS Regexes from Examples

Yeting Li, Zhiwu Xu, Jialun Cao, Haiming Chen, Tingjian Ge, Shing-Chi Cheung, Haoren Zhao

摘要

Regular expressions (regexes) are widely used in different fields of computer science such as programming languages, string processing and databases. However, existing tools for synthesizing or repairing regexes were not designed to be resilient to Regex Denial of Service (ReDoS) attacks. Specifically, if a regex has super-linear (SL) worst-case complexity, an attacker could provide carefully-crafted inputs to launch ReDoS attacks. Therefore, in this paper, we propose a programming-by-example framework, FlashRegex, for generating anti-ReDoS regexes by either synthesizing or repairing from given examples. It is the first framework that integrates regex synthesis and repair with the awareness of ReDoS-vulnerabilities. We present novel algorithms to deduce anti-ReDoS regexes by reducing the ambiguity of these regexes and by using Boolean Satisfiability (SAT) or Neighborhood Search (NS) techniques. We evaluate FlashRegex with five related state-of-the-art tools. The evaluation results show that our work can effectively and efficiently generate anti-ReDoS regexes from given examples, and also reveal that existing synthesis and repair tools have neglected ReDoS-vulnerabilities of regexes. Specifically, the existing synthesis and repair tools generated up to 394 ReDoS-vulnerable regex within few seconds to more than one hour, while FlashRegex generated no SL regex within around five seconds. Furthermore, the evaluation results on ReDoS-vulnerable regex repair also show that FlashRegex has better capability than existing repair tools and even human experts, achieving 4 more ReDoS-invulnerable regex after repair without trimming and resorting, highlighting the usefulness of FlashRegex in terms of the generality, automation and user-friendliness.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Exploiting Input Sanitization for Regex Denial of Service 引用了 TRANSREGEX: Multi-modal Regular Expression Synthesis by Generate-and-Repair
  • Exploiting Input Sanitization for Regex Denial of Service 引用了 SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
  • Search-Based Regular Expression Inference on a GPU 引用了 TRANSREGEX: Multi-modal Regular Expression Synthesis by Generate-and-Repair
  • ReDoSHunter: A Combined Static and Dynamic Approach for Regular Expression DoS Detection 引用了 SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity Vulnerabilities
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  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. Exploiting Input Sanitization for Regex Denial of ServiceEfe Barlas, Xin Du, James C. DavisICSE 2022 · 16 次引用
  3. TRANSREGEX: Multi-modal Regular Expression Synthesis by Generate-and-RepairYeting Li, Shuaimin Li, Zhiwu Xu, Jialun Cao 等ICSE 2021 · 16 次引用
  4. Repairing DoS Vulnerability of Real-World RegexesNariyoshi Chida, Tachio TerauchiS&P 2022 · 15 次引用
  5. Search-Based Regular Expression Inference on a GPUMojtaba Valizadeh, Martin BergerPLDI 2023 · 11 次引用

它引用的 Paper1

  1. SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity VulnerabilitiesTheofilos Petsios, Jason Zhao, Angelos D. Keromytis, Suman JanaCCS 2017 · 214 次引用

相关 Paper

  1. Improving Developers' Understanding of Regex Denial of Service Tools through Anti-Patterns and Fix StrategiesSk Adnan Hassan, Zainab Aamir, Dongyoon Lee, James C. Davis 等S&P 2023
  2. RegexScalpel: Regular Expression Denial of Service (ReDoS) Defense by Localize-and-FixYeting Li, Yecheng Sun, Zhiwu Xu, Jialun Cao 等USENIX Security 2022
  3. Revealer: Detecting and Exploiting Regular Expression Denial-of-Service VulnerabilitiesYinxi Liu, Mingxue Zhang, Wei MengS&P 2021 · 28 次引用
  4. Effective ReDoS Detection by Principled Vulnerability Modeling and Exploit GenerationXinyi Wang, Cen Zhang, Yeting Li, Zhiwu Xu 等S&P 2023
  5. Using Selective Memoization to Defeat Regular Expression Denial of Service (ReDoS)James C. Davis, Francisco Servant, Dongyoon LeeS&P 2021 · 43 次引用
黄昏的海面,两侧是细线勾勒的悬崖