Skip to content

Detected assertion fails and index out of bounds panic during fuzz testing #1265

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
0x64617061 opened this issue May 13, 2025 · 0 comments

Comments

@0x64617061
Copy link

What version of regex are you using?

My tests where done using code from commit: 1a069b9

Describe the bug at a high level.

I did fuzzing tests with the provided targets and the fuzzer detected panics.

What are the steps to reproduce the behavior?

Use the example inputs with the respective fuzz targets.

What is the actual behavior?

I did fuzz runs with the ast_roundtrip target and the fuzzer detected an assertion fail:

$ diff left right
3c3
< Position(o: 8, l: 1, c: 7)), 
---
> Position(o: 5, l: 1, c: 6)), 
6c6
< Position(o: 8, l: 1, c: 7)), 
---
> Position(o: 5, l: 1, c: 6)),

While testing the target fuzz_regex_automata_deserialize_dense_dfa the fuzzer detected two panics/issue:

  • regex/regex-automata/src/dfa/dense.rs:4631:9 index out of bounds: the len is 0 but the index is 1
  • regex/regex-automata/src/dfa/search.rs:559:5 assertion failed: !dfa.is_match_state(sid)

I attached the error inducing inputs as an attachment to this issue:

regex_panic_inputs.zip

What is the expected behavior?

Fuzzing the respective targets should not cause a panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant