淋巴用什么药可以消除| 什么是幽门螺杆菌感染| 五险一金的一金是什么| 榴莲有什么好处| 宝宝dha什么时候吃最好| 吃什么补肾气| 肿瘤病人不能吃什么| loho是什么牌子| a型血的人是什么性格| nlp是什么| 猪冲蛇开什么生肖| 睡觉起来眼皮肿是什么原因| 多愁善感的动物是什么生肖| 为什么吐后反而舒服了| 为什么脚底会脱皮| 辅警是什么编制| 红十字会是干什么的| 什么移动卡流量多| 肉瘤是什么| 红酒配什么菜| 宫颈肥大有什么症状| 右肾占位是什么意思| 什么叫单亲家庭| 44什么意思| 贼头贼脑是什么生肖| 养肝护肝吃什么最好| 避孕套是什么| 加盟店是什么意思| 好雅兴是什么意思| 收阴是什么意思| 乳房皮肤痒是什么原因| 高血压可以喝什么饮料| 糖尿病不能吃什么| 画是什么生肖| 精子为什么是黄色的| 9个月宝宝玩什么玩具| 口腔溃疡吃什么维生素| instagram什么意思| 效应是什么意思| 月经是什么| 吃甲硝唑有什么副作用| 疖子用什么药膏最好| 退着走路有什么好处| b型血的人是什么性格| 外婆菜是什么| 尿分叉吃什么药能治好| 慢性咽炎吃什么药| 吃叶酸有什么副作用| 女生为什么会肾虚| 迪奥口红属于什么档次| 忌诸事不宜是什么意思| 经常抽筋是什么原因| 喝什么减肥| 小龙虾吃什么| 72年属什么生肖属相| 强光斑是什么意思| 3.23是什么星座| 2020年属什么| 咳嗽喉咙痒吃什么药好得快| 先兆临产是什么意思| 七夕节干什么| 梦到自己拉大便是什么预兆| 为什么说金克木生财| 夕阳西下是什么意思| 突然头晕目眩是什么原因| 遥不可及是什么意思| 什么的故事填空| 9点多是什么时辰| 窦性心动过速是什么原因| 什么的香味| 昔日是什么意思| 感冒发烧吃什么药| 菩提子是什么树的种子| 1月18是什么星座| pisen是什么牌子| 多多益善的意思是什么| 儿童吃什么长个子最快| 近视用什么镜矫正| 什么钙片最好| 犹太人是什么意思| 玥字属于五行属什么| 巴士是什么意思| 梦遗是什么| 贡眉是什么茶| 血痰是什么原因| 家里进蝙蝠什么预兆| 女人梦见老鼠什么征兆| 照影是什么意思| 吃什么水果降血压| 牛黄安宫丸什么时候吃最好| 四月什么星座| 小郡肝是什么| 农历9月21日是什么星座| 舌头上有裂纹是什么原因| 银饰变黑是什么原因| 早上11点是什么时辰| 火拼是什么意思| 上火吃什么水果| 生理性囊肿是什么意思| 雾化器是干什么用的| 剁椒鱼头是什么菜系| 苏菲是什么意思| 查血常规挂什么科| 什么是植发| 封豕长蛇是什么意思| 人授和试管有什么区别| 国师代表什么生肖| 小孩为什么会细菌感染| 彩超能检查什么| 欧金金什么意思| 体内湿气重吃什么药效果好| 菩提根是什么| 凌迟是什么意思| 徒手是什么意思| 眼睛模糊用什么药好| 拔完智齿能吃什么| 冲锋陷阵是什么生肖| 双侧上颌窦炎是什么病| 亨特综合症是什么病| 女人什么时候停经| 舌苔发白是什么原因呢| 腿抽筋挂什么科| 双克是什么药| 副高相当于什么级别| 724是什么意思| 月经总是提前是什么原因| 带银子发黑是什么原因| 什么东西泡水喝降血压| 核桃什么时候成熟| 漂头发是什么意思| 脱发吃什么药| 乳房发烫胀痛什么原因| ih医学上是什么意思| 全身骨头疼是什么原因| 顺子是什么意思| 皮肤容易晒黑是什么原因| 宰相肚里能撑船是什么意思| 赖床什么意思| 什么不什么身| 农历4月14日是什么星座| mra是什么检查| 磨牙是什么原因怎么治疗| 533是什么意思| 甲硝唑吃多了有什么危害| 九四年属什么生肖| 舌头中间裂纹是什么病| 南瓜和什么相克| 膝盖缝里面疼什么原因| 过敏性鼻炎吃什么药能快速缓解| 肛瘘是什么意思| 义眼是什么意思| 天上的星星为什么会发光| 舌头麻是什么病的前兆| 东北有什么好玩的景点| 家里适合养什么花| 愿君多采撷是什么意思| 生理盐水是什么东西| 保质期是什么意思| 拉谷谷女装什么档次的| 绿草如茵是什么生肖| 对峙什么意思| 什么是向量| 马来玉是什么玉| 眉毛稀少是什么原因| 私生是什么意思| 为什么会得霉菌感染| 小熊衣服叫什么牌子| 早泄有什么办法| 为什么会磨牙| 铝中毒有什么症状| 蛋白尿是什么颜色| 82年是什么年| supreme是什么牌子| 肝郁是什么意思| 心脏衰竭吃什么药| 经常吐口水是什么原因| 头不舒服是什么原因| 派出所所长是什么级别| 有料是什么意思| 食物过敏吃什么药| 新生儿屁多是什么原因| 舌苔厚发黄是什么原因| 兰若是什么意思| 什么辉煌四字词语| 肾萎缩吃什么药好| 燃气灶什么品牌好| 淀粉和面粉有什么区别| 卒中患者什么意思| 梅毒是什么样的| 鬼压床是什么原因造成的| 水银是什么东西| 人为什么会得肿瘤| 眼睛视力模糊是什么原因| 鸡生肖配什么生肖最好| 乙肝核心抗体阳性什么意思| 间作套种是什么意思| 手掌上的三条线分别代表什么| 胃大是什么原因造成的| 眼镜发明之前眼镜蛇叫什么| 权衡是什么意思| 524是什么意思| 活菩萨是什么意思| 停电了打什么电话| 配伍是什么意思| 屁眼火辣辣的疼是什么原因| 痛风用什么消炎药最好| 老是什么意思| cyan是什么颜色| 腰椎间盘突出什么症状| 吃茶油对身体有什么好处| 乘务长是干什么的| 缺铁性贫血吃什么好| 榴莲跟什么不能一起吃| 双侧中耳乳突炎是什么意思| 肝有什么功能| 这是什么| 间接胆红素高是什么原因| 女生被插是什么感觉| 溢水是什么意思| 成何体统是什么意思| 19朵玫瑰代表什么意思| 金先读什么| 做梦梦见好多蛇是什么预兆| 分家是什么意思| 羊球是什么| 国企属于什么编制| 曹操是个什么样的人| 霖五行属什么| 风属于五行属什么| trust什么意思| 糖醋里脊是什么肉| 银手镯为什么会变黑| 什么冰冰| 9点多是什么时辰| 猪肝不能和什么一起吃| 什么是川崎病是什么病| 什么叫有机蔬菜| 常放屁是什么原因| 1958年属什么生肖| 紫玫瑰花语是什么意思| 517是什么意思| 感冒头疼吃什么药好| 黄芪和什么搭配不上火| 牛奶不能和什么东西一起吃| 人的舌头有什么作用| 乙肝15阳性什么意思| 为什么当警察| 为什么脚会臭| 什么的劝告| 1700年是什么朝代| 鼻塞流清鼻涕吃什么药| 什么时候吃榴莲最好| 幽门螺杆菌吃什么药| 斑鱼是什么鱼| 试婚是什么意思啊| 肚子胀气吃什么| 痛风不能喝什么饮料| 吃什么对卵巢好| 过氧化氢浓度阳性是什么意思| 赛能是什么药| 什么叫尿潴留| 中国的八大菜系是什么| 9月30日是什么纪念日| 西瓜和什么相克| 百度Jump to content

o型血阳性是什么意思

From Wikipedia, the free encyclopedia
百度 关于这枚SoC去年在夏威夷已经讲的很详细了,10nmLPP工艺制程8核Kryo架构处理器(4*A75+4*A55),Adreno630视觉处理子系统(包括GPU,VPU和DPU)。

A regular expression denial of service (ReDoS)[1] is an algorithmic complexity attack that produces a denial-of-service by providing a regular expression and/or an input that takes a long time to evaluate. The attack exploits the fact that many[2] regular expression implementations have super-linear worst-case complexity; on certain regex-input pairs, the time taken can grow polynomially or exponentially in relation to the input size. An attacker can thus cause a program to spend substantial time by providing a specially crafted regular expression and/or input. The program will then slow down or become unresponsive.[3][4]

Description

[edit]

Regular expression ("regex") matching can be done by building a finite-state automaton. Regex can be easily converted to nondeterministic automata (NFAs), in which for each state and input symbol, there may be several possible next states. After building the automaton, several possibilities exist:

  • the engine may convert it to a deterministic finite-state automaton (DFA) and run the input through the result;
  • the engine may try one by one all the possible paths until a match is found or all the paths are tried and fail ("backtracking").[5][6]
  • the engine may consider all possible paths through the nondeterministic automaton in parallel;
  • the engine may convert the nondeterministic automaton to a DFA lazily (i.e., on the fly, during the match).

Of the above algorithms, the first two are problematic. The first is problematic because a deterministic automaton could have up to states where is the number of states in the nondeterministic automaton; thus, the conversion from NFA to DFA may take exponential time. The second is problematic because a nondeterministic automaton could have an exponential number of paths of length , so that walking through an input of length will also take exponential time.[7] The last two algorithms, however, do not exhibit pathological behavior.

Note that for non-pathological regular expressions, the problematic algorithms are usually fast, and in practice, one can expect them to "compile" a regex in O(m) time and match it in O(n) time; instead, simulation of an NFA and lazy computation of the DFA have O(m2n) worst-case complexity.[a] Regex denial of service occurs when these expectations are applied to a regex provided by the user, and malicious regular expressions provided by the user trigger the worst-case complexity of the regex matcher.

While regex algorithms can be written in an efficient way, most regex engines in existence extend the regex languages with additional constructs that cannot always be solved efficiently. Such extended patterns essentially force the implementation of regex in most programming languages to use backtracking.

Examples

[edit]

Exponential backtracking

[edit]

The most severe type of problem happens with backtracking regular expression matches, where some patterns have a runtime that is exponential in the length of the input string.[8] For strings of characters, the runtime is . This happens when a regular expression has three properties:

  • the regular expression applies repetition (+, *) to a subexpression;
  • the subexpression can match the same input in multiple ways, or the subexpression can match an input string which is a prefix of a longer possible match;
  • and after the repeated subexpression, there is an expression that matches something which the subexpression does not match.

The second condition is best explained with two examples:

  • in (a|a)+$, repetition is applied to the subexpression a|a, which can match a in two ways on each side of the alternation.
  • in (a+)*$, repetition is applied to the subexpression a+, which can match a or aa, etc.

In both of these examples we used $ to match the end of the string, satisfying the third condition, but it is also possible to use another character for this. For example (a|aa)*c has the same problematic structure.

All three of the above regular expressions will exhibit exponential runtime when applied to strings of the form . For example, if you try to match them against aaaaaaaaaaaaaaaaaaaaaaaax on a backtracking expression engine, it will take a significantly long time to complete, and the runtime will approximately double for each extra a before the x.

It is also possible to have backtracking which is polynomial time , instead of exponential. This can also cause problems for long enough inputs, though less attention has been paid to this problem as malicious input must be much longer to have a significant effect. An example of such a pattern is "a*b?a*c", when the input is an arbitrarily long sequence of "a"s.

Vulnerable regexes in online repositories

[edit]

So-called "evil" or vulnerable regexes have been found in online regular expression repositories. Note that it is enough to find a vulnerable subexpression in order to attack the full regex:

  1. RegExLib, id=1757 (email validation) – see red part
    ^([a-zA-Z0-9])(([\-.]|[_]+)?([a-zA-Z0-9]+))*(@){1}[a-z0-9]+[.]{1}(([a-z]{2,3})|([a-z]{2,3}[.]{1}[a-z]{2,3}))$
  2. OWASP Validation Regex Repository, Java Classname – see red part
    ^(([a-z])+.)+[A-Z]([a-z])+$

These two examples are also susceptible to the input aaaaaaaaaaaaaaaaaaaaaaaa!.

Attacks

[edit]

If the regex itself is affected by user input, such as a web service permitting clients to provide a search pattern, then an attacker can inject a malicious regex to consume the server's resources. Therefore, in most cases, regular expression denial of service can be avoided by removing the possibility for the user to execute arbitrary patterns on the server. In this case, web applications and databases are the main vulnerable applications. Alternatively, a malicious page could hang the user's web browser or cause it to use arbitrary amounts of memory.

However, if a vulnerable regex exists on the server-side already, then an attacker may instead be able to provide an input that triggers its worst-case behavior. In this case, e-mail scanners and intrusion detection systems could also be vulnerable.

In the case of a web application, the programmer may use the same regular expression to validate input on both the client and the server side of the system. An attacker could inspect the client code, looking for evil regular expressions, and send crafted input directly to the web server in order to hang it.[9]

Mitigation

[edit]

ReDoS can be mitigated without changes to the regular expression engine, simply by setting a time limit for the execution of regular expressions when untrusted input is involved.[10]

ReDoS can be avoided entirely by using a non-vulnerable regular expression implementation. After CloudFlare's web application firewall (WAF) was brought down by a PCRE ReDoS in 2019, the company rewrote its WAF to use the non-backtracking Rust regex library, using an algorithm similar to RE2.[11][12]

Vulnerable regular expressions can be detected programmatically by a linter.[13] Methods range from pure static analysis[14][15] to fuzzing.[16] In most cases, the problematic regular expressions can be rewritten as "non-evil" patterns. For example, (.*a)+ can be rewritten to ([^a]*a)+. Possessive matching and atomic grouping, which disable backtracking for parts of the expression,[17] can also be used to "pacify" vulnerable parts.[18][19]

See also

[edit]

References

[edit]
  1. ^ Lazy computation of the DFA can usually reach the speed of deterministic automatons while keeping worst case behavior similar to simulation of an NFA. However, it is considerably more complex to implement and can use more memory.
  1. ^ OWASP (2025-08-05). "Regex Denial of Service". Retrieved 2025-08-05.
  2. ^ Davis, James; Louis, Michael; Coghlan, Christy; Servant, Francisco; Lee, Dongyoon (2019). "Why Aren't Regular Expressions a Lingua Franca? An Empirical Study on the Re-use and Portability of Regular Expressions" (PDF). The ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering: 443–454.
  3. ^ RiverStar Software (2025-08-05). "Security Bulletin: Caution Using Regular Expressions". Archived from the original on 2025-08-05. Retrieved 2025-08-05.
  4. ^ Ristic, Ivan (2025-08-05). ModSecurity Handbook. London, UK: Feisty Duck Ltd. p. 173. ISBN 978-1-907117-02-2. Archived from the original on 2025-08-05. Retrieved 2025-08-05.
  5. ^ Crosby and Wallach, Usenix Security (2003). "Regular Expression Denial Of Service". Archived from the original on 2025-08-05. Retrieved 2025-08-05.
  6. ^ Bryan Sullivan (2025-08-05). "Regular Expression Denial of Service Attacks and Defenses". Retrieved 2025-08-05.
  7. ^ Kirrage, J.; Rathnayake, A.; Thielecke, H. (2013). "Static Analysis for Regular Expression Denial-of-Service Attacks". Network and System Security. Madrid, Spain: Springer. pp. 135–148. arXiv:1301.0849. doi:10.1007/978-3-642-38631-2_11.
  8. ^ Jim Manico and Adar Weidman (2025-08-05). "OWASP Podcast 56 (ReDoS)". Retrieved 2025-08-05.
  9. ^ Barlas, Efe; Du, Xin; Davis, James (2022). "Exploiting Input Sanitization for Regex Denial of Service" (PDF). ACM/IEEE International Conference on Software Engineering: 1–14. arXiv:2303.01996.
  10. ^ "Backtracking in .NET regular expressions - .NET". learn.microsoft.com. 11 August 2023. When using System.Text.RegularExpressions to process untrusted input, pass a timeout. A malicious user can provide input to RegularExpressions, causing a Denial-of-Service attack. ASP.NET Core framework APIs that use RegularExpressions pass a timeout.
  11. ^ "Making the WAF 40% faster". The Cloudflare Blog. 1 July 2020.
  12. ^ Cox, Russ (2007). "Regular Expression Matching Can Be Simple And Fast". Retrieved 2025-08-05. – describes the RE2 algorithm
  13. ^ See e.g. Schmidt, Michael (30 March 2023). "RunDevelopment/scslre". GitHub., TSUYUSATO, Kitsune. "recheck Introduction"., and Davis, James. "vuln-regex-detector/src/detect/README.md". GitHub.
  14. ^ H. Thielecke, A. Rathnayake (2013). "Regular expression denial of service (ReDoS) static analysis Archived 2025-08-05 at the Wayback Machine". Retrieved 2025-08-05.
  15. ^ B. van der Merwe, N Weideman (2017). "Regex Static Analysis". Retrieved 2025-08-05.
  16. ^ "Fuzzing with Static Analysis | recheck". makenowjust-labs.github.io.
  17. ^ "Essential classes: Regular Expressions: Quantifiers: Differences Among Greedy, Reluctant, and Possessive Quantifiers". The Java Tutorials. Oracle. Archived from the original on 7 October 2020. Retrieved 23 December 2016.
  18. ^ "compose-regexp.js, "Atomic matching"". GitHub. 2 January 2024.
    "tc39/proposal-regexp-atomic-operators". Ecma TC39. 31 December 2023.
  19. ^ "Preventing Regular Expression Denial of Service (ReDoS)". www.regular-expressions.info.
[edit]
白兰地属于什么酒 什么是闭口 北海龙王叫什么 养殖什么最赚钱 汉族人是什么人种
办理公证需要什么材料 溶豆是什么 42属什么 单于是什么意思 黄芪起什么作用
背疼挂什么科 大学什么时候开始收费 维他命是什么 篇幅是什么意思 脑白质变性是什么意思
怕热是什么体质 胎停了有什么明显症状 腋下黑是什么原因 gloomy是什么意思 负罪感什么意思
放下执念是什么意思hcv9jop1ns9r.cn 股票缺口是什么意思hcv9jop2ns6r.cn 苹果像什么hcv8jop8ns8r.cn 器质性疾病是什么意思hcv7jop5ns4r.cn 1978年出生是什么命hcv8jop7ns0r.cn
拔牙后吃什么ff14chat.com 阑尾炎痛起来什么感觉hcv8jop8ns4r.cn 胆结石属于什么科hebeidezhi.com 什么是功hcv9jop7ns0r.cn 乳腺穿刺是什么意思hcv9jop4ns6r.cn
pda是什么hcv8jop8ns9r.cn 茶话会是什么意思hcv8jop1ns3r.cn 祸从口出什么意思hcv9jop4ns5r.cn 老年人腿浮肿是什么原因引起的hcv8jop8ns3r.cn 什么的小莲蓬zhongyiyatai.com
什么样的树bfb118.com 为什么会有黑眼圈hcv8jop8ns1r.cn 8月8号是什么星座hcv9jop6ns0r.cn 伤春悲秋什么意思hcv7jop6ns0r.cn 男人吃什么可以增强性功能hcv7jop7ns4r.cn
百度