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

oss-fuzz: timout in parser #675

Closed
CAD97 opened this issue Jul 29, 2022 · 2 comments · Fixed by #684
Closed

oss-fuzz: timout in parser #675

CAD97 opened this issue Jul 29, 2022 · 2 comments · Fixed by #684

Comments

@CAD97
Copy link
Contributor

CAD97 commented Jul 29, 2022

Describe the bug

Fuzzing found a timeout. Detailed report: https://oss-fuzz.com/testcase?key=6048143472459776

Upstream tracker: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49513

To Reproduce

https://google.github.io/oss-fuzz/advanced-topics/reproducing/

Expected behavior

Completing within the timeout window (60s).

Additional context

crash revision: e30f63e

🙃 I'm getting cc'd at my primary email and can access the oss-fuzz.com details but not the bugs.chromium.org tracker. (google/oss-fuzz#8096)

@CAD97 CAD97 added the bug label Jul 29, 2022
@tomtau
Copy link
Contributor

tomtau commented Aug 2, 2022

not sure if this is the same issue as #402
There was also this issue: #383 but that may be a different one.

The minimised sample:


/*//j/*/*;'//*//*/*/*;'/*//*/*;**//*//*/*/*;'/*//*//*/*/*;+/*//*/*;*B/*//*/*/*/*;'/*//*/*;**//*//*/*/*;'/*//*//*/*/*;+/*//*/*;*B/*//*//*/*;**N//*//*/*/*;'/*//*//*/

*//*/*;**N//*//*/*/*;'/*//*//*/

*/*;+/*//**/*/*;'/*//*//*;*/*///*/*;

a part of the stack trace:

...


#8 0x55f9c95148fc in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$GT$::parse::rules::visible::block_comment::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::h8e5b33ba8dc22a22 pest/meta/src/grammar.rs:2:28408
--
  | #9 0x55f9c95148fc in pest::parser_state::ParserState$LT$R$GT$::lookahead::hebf6e2792f2a3cb2 pest/pest/src/parser_state.rs:749:22
  | #10 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$GT$::parse::rules::visible::block_comment::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::h92476d24fb517d7c pest/meta/src/grammar.rs:2:28369
  | #11 0x55f9c9628b47 in pest::parser_state::ParserState$LT$R$GT$::sequence::h48ef28785bd1f818 pest/pest/src/parser_state.rs:369:22
  | #12 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$GT$::parse::rules::visible::block_comment::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::he2c62ff4eb2668eb pest/meta/src/grammar.rs:2:28339
  | #13 0x55f9c9628b47 in core::result::Result$LT$T$C$E$GT$::or_else::hbd4ee8631a517039 /rustc/2643b16468fda787470340890212591d8bc832b7/library/core/src/result.rs:1435:23
  | #14 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$GT$::parse::rules::visible::block_comment::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::h3e9f01b1f416e418 pest/meta/src/grammar.rs:2:28286
  | #15 0x55f9c9628b47 in core::result::Result$LT$T$C$E$GT$::and_then::hafbe6ccb0c0a8bc3 /rustc/2643b16468fda787470340890212591d8bc832b7/library/core/src/result.rs:1361:22
  | #16 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$GT$::parse::rules::visible::block_comment::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::h2092a572b5504f1c pest/meta/src/grammar.rs:2:28230
  | #17 0x55f9c9624433 in pest::parser_state::ParserState$LT$R$GT$::sequence::hae3c3606764ec7f3 pest/pest/src/parser_state.rs:369:22
  | #18 0x55f9c9624433 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$GT$::parse::rules::visible::block_comment::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::h39cfaf3b11591e9b pest/meta/src/grammar.rs:2:28200
  | #19 0x55f9c9624433 in pest::parser_state::ParserState$LT$R$GT$::repeat::h4c6bbed057993655 pest/pest/src/parser_state.rs:415:26
  | #20 0x55f9c9624433 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$GT$::parse::rules::visible::block_comment::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::_$u7b$u7b$closure$u7d$u7d$::h27acc5663c220076 pest/meta/src/grammar.rs:2:28172

#8 0x55f9c95148fc in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$$GT$::parse::rules::visible::block_comment::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h8e5b33ba8dc22a22 [pest/meta/src/grammar.rs:2](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/meta/src/grammar.rs#L2):28408
	    #9 0x55f9c95148fc in pest::parser_state::ParserState$LT$R$GT$::lookahead::hebf6e2792f2a3cb2 [pest/pest/src/parser_state.rs:749](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/pest/src/parser_state.rs#L749):22
	    #10 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$$GT$::parse::rules::visible::block_comment::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h92476d24fb517d7c [pest/meta/src/grammar.rs:2](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/meta/src/grammar.rs#L2):28369
	    #11 0x55f9c9628b47 in pest::parser_state::ParserState$LT$R$GT$::sequence::h48ef28785bd1f818 [pest/pest/src/parser_state.rs:369](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/pest/src/parser_state.rs#L369):22
	    #12 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$$GT$::parse::rules::visible::block_comment::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::he2c62ff4eb2668eb [pest/meta/src/grammar.rs:2](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/meta/src/grammar.rs#L2):28339
	    #13 0x55f9c9628b47 in core::result::Result$LT$T$C$E$GT$::or_else::hbd4ee8631a517039 /rustc/2643b16468fda787470340890212591d8bc832b7/library/core/src/result.rs:1435:23
	    #14 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$$GT$::parse::rules::visible::block_comment::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h3e9f01b1f416e418 [pest/meta/src/grammar.rs:2](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/meta/src/grammar.rs#L2):28286
	    #15 0x55f9c9628b47 in core::result::Result$LT$T$C$E$GT$::and_then::hafbe6ccb0c0a8bc3 /rustc/2643b16468fda787470340890212591d8bc832b7/library/core/src/result.rs:1361:22
	    #16 0x55f9c9628b47 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$$GT$::parse::rules::visible::block_comment::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h2092a572b5504f1c [pest/meta/src/grammar.rs:2](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/meta/src/grammar.rs#L2):28230
	    #17 0x55f9c9624433 in pest::parser_state::ParserState$LT$R$GT$::sequence::hae3c3606764ec7f3 [pest/pest/src/parser_state.rs:369](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/pest/src/parser_state.rs#L369):22
	    #18 0x55f9c9624433 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$$GT$::parse::rules::visible::block_comment::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h39cfaf3b11591e9b [pest/meta/src/grammar.rs:2](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/meta/src/grammar.rs#L2):28200
	    #19 0x55f9c9624433 in pest::parser_state::ParserState$LT$R$GT$::repeat::h4c6bbed057993655 [pest/pest/src/parser_state.rs:415](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/pest/src/parser_state.rs#L415):26
	    #20 0x55f9c9624433 in _$LT$pest_meta..parser..grammar..PestParser$u20$as$u20$pest..parser..Parser$LT$pest_meta..parser..grammar..Rule$GT$$GT$::parse::rules::visible::block_comment::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h27acc5663c220076 [pest/meta/src/grammar.rs:2](https://github.com/pest-parser/pest/blob/e30f63e9a5b0967a2d5a2f6ef7b7d8edfc526d3f/meta/src/grammar.rs#L2):28172
...

@tomtau
Copy link
Contributor

tomtau commented Aug 5, 2022

@CAD97 reproduced it on 2.1.x, but that sample terminates fine on 2.0.x

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

Successfully merging a pull request may close this issue.

2 participants