Skip to content
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

vrl_parser::parse - invalid escape #45

Open
stasos24 opened this issue Jul 13, 2022 · 0 comments
Open

vrl_parser::parse - invalid escape #45

stasos24 opened this issue Jul 13, 2022 · 0 comments
Labels
fuzz Issues found from fuzz testing type: bug A code related bug vrl: parser Changes to the syntax parser

Comments

@stasos24
Copy link

stasos24 commented Jul 13, 2022

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

vrl_parser::parser function panics when receive a crash.file input
Steps to reproduce:
Download a repo with fuzz harness: https://github.com/stasos24/vector/tree/master/lib/vrl/parser/fuzzing

cargo build --bin covbuild
target/debug/covbuild < crash_escape.file

Configuration

No response

Version

v0.23.0

Debug Output

thread 'main' panicked at 'not implemented: invalid escape', /opt/fuzz/vector/lib/vrl/parser/src/lex.rs:1266:22
stack backtrace:
   0: rust_begin_unwind
             at /rustc/38b72154ded23847cd08a796d0c6708b5efac265/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/38b72154ded23847cd08a796d0c6708b5efac265/library/core/src/panicking.rs:142:14
   2: vrl_parser::lex::unescape_string_literal
   3: vrl_parser::lex::StringLiteralToken<&str>::template
   4: vrl_parser::parser::__parse__Program::__reduce494
   5: vrl_parser::parser::__parse__Program::__reduce
   6: <vrl_parser::parser::__parse__Program::__StateMachine as lalrpop_util::state_machine::ParserDefinition>::reduce
   7: covbuild::main

Example Data

crash_file
VRL Source:
"\}"n"

Additional Context

No response

References

No response

@stasos24 stasos24 added the type: bug A code related bug label Jul 13, 2022
@fuchsnj fuchsnj added the vrl: parser Changes to the syntax parser label Jul 13, 2022
@fuchsnj fuchsnj transferred this issue from vectordotdev/vector Mar 28, 2023
@fuchsnj fuchsnj added the fuzz Issues found from fuzz testing label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuzz Issues found from fuzz testing type: bug A code related bug vrl: parser Changes to the syntax parser
Projects
None yet
Development

No branches or pull requests

2 participants