You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
libFuzzer outputs that crash libc++'s regex engine #24785
Is there still an interest in fuzzing libc++'s regex?
We now have https://github.com/google/oss-fuzz, a continuous
fuzzing service, where libc++ would be welcome.
Fuzzing regex now yield this:
projects/libcxx/include/regex:4058:21: runtime error: signed integer overflow: 403809844 * 10 cannot be represented in type 'int'
Activity
mclow commentedon Aug 10, 2015
assigned to @mclow
mclow commentedon Aug 10, 2015
First crash - in regex_match. Using this target function
extern "C" void LLVMFuzzerTestOneInput(const unsigned char *data, size_t size) {
if (size > 0)
{
try
{
std::regex::flag_type flag = std::regex_constants::grep;
std::string s((const char *)data, size);
std::regex re(s, flag);
std::regex_match(s, re);
}
catch (std::regex_error &ex) {}
}
}
mclow commentedon Aug 24, 2015
I reduced this test case down to "\8" and fixed it in 245849.
Leaving the bug open b/c I think the fuzzer will find more.
mclow commentedon Aug 26, 2015
Here's another one the uzzer found (simplified).
This one doesn't fail, but it takes minutes to match against itself.
const char bad = "#\(.\)*###################.######.####### ";
kcc commentedon Feb 10, 2017
Is there still an interest in fuzzing libc++'s regex?
We now have https://github.com/google/oss-fuzz, a continuous
fuzzing service, where libc++ would be welcome.
Fuzzing regex now yield this:
projects/libcxx/include/regex:4058:21: runtime error: signed integer overflow: 403809844 * 10 cannot be represented in type 'int'
and then quickly gets stuck in timeouts.
mclow commentedon Feb 7, 2019
We have fixed all the regex crashes that OSS-Fuzz has reported.
What's left is stack overflows, large memory usage, and timeouts.
Closing this bug, because they're all being tracked over at OSS-Fuzz.