论文标题

修复现实世界的DOS脆弱性

Repairing DoS Vulnerability of Real-World Regexes

论文作者

Chida, Nariyoshi, Terauchi, Tachio

论文摘要

从示例中进行了很多工作,在综合和修复正则表达式(简称为简短)方面进行了很多工作。这些逐示例(PBE)方法通过让用户通过示例反映其意图来帮助用户编写回发。但是,现有方法可能会产生匹配可能需要超级线性时间的正性,并且容易受到正则拒绝服务(重做)攻击的攻击。本文介绍了第一种PBE维修方法,该方法可以保证仅产生无敌的言论。重要的是,我们的方法可以处理包含外观和反应的真实再发条。由于扩展,现有的对仅考虑纯正重视的重做漏洞的正式定义不足。因此,我们首先给出了一种新颖的正式语义和对现实世界上的匹配算法的回溯性的复杂性,并随之而来的是,对现实世界中的重复脆弱性进行了第一个正式定义。接下来,我们提出了一种称为现实世界强的1个Unambiguity的新型条件,足以保证现实世界的无敌性无敌性,并正式化相应的PBE修复问题。最后,我们提出了一种解决维修问题的算法。该算法建立并扩展了先前的PBE方法,以处理现实世界扩展,并具有约束,以实施现实世界中强1个不合理条件。

There has been much work on synthesizing and repairing regular expressions (regexes for short) from examples. These programming-by-example (PBE) methods help the users write regexes by letting them reflect their intention by examples. However, the existing methods may generate regexes whose matching may take super-linear time and are vulnerable to regex denial of service (ReDoS) attacks. This paper presents the first PBE repair method that is guaranteed to generate only invulnerable regexes. Importantly, our method can handle real-world regexes containing lookarounds and backreferences. Due to the extensions, the existing formal definitions of ReDoS vulnerabilities that only consider pure regexes are insufficient. Therefore, we first give a novel formal semantics and complexity of backtracking matching algorithms for real-world regexes, and with them, give the first formal definition of ReDoS vulnerability for real-world regexes. Next, we present a novel condition called real-world strong 1-unambiguity that is sufficient for guaranteeing the invulnerability of real-world regexes, and formalize the corresponding PBE repair problem. Finally, we present an algorithm that solves the repair problem. The algorithm builds on and extends the previous PBE methods to handle the real-world extensions and with constraints to enforce the real-world strong 1-unambiguity condition.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源