DoS risk: panic "index out of bounds" while building very small regex · Issue #464 · rust-lang/regex (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Description
Hi,
regex::Regex::new("a{\r\n");
will cause
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1'
I found it while porting https://github.com/rust-fuzz/targets to afl.rs
and honggfuzz
(it's currently only using libFuzzer
).
It's funny because libFuzzer seems unable to find it while honggfuzz finds it reliably in just a couple of seconds and AFL in a couple of dozen of minutes.
Regexes sometimes are built from untrusted input so I guess it could be used for denial of service.
@robertswiecki : I found it with honggfuzz
first, is that trophy worthy?
Metadata
Labels
Development
No branches or pull requests