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

Option::unwrap panic in parser when ENABLE_HEADING_ATTRIBUTES is set #571

Closed
5225225 opened this issue Jan 18, 2022 · 5 comments
Closed

Comments

@5225225
Copy link
Contributor

5225225 commented Jan 18, 2022

I have come bearing gifts. (When looking up the spelling of that, I just learned the phrase was about the trojan horse. Neat.)

But inside of the horse is a fuzzer panic.

#[test]
fn test_bad_heading_attribute() {
    let mut opts = pulldown_cmark::Options::empty();

    opts.insert(Options::ENABLE_HEADING_ATTRIBUTES);

    let data = "[[][({][}\n-";

    for _ in pulldown_cmark::Parser::new_ext(data, opts) {};
}

This took a whole 10k seconds of CPU time, or 2 hours of wall clock time to find. So we are definitely making progress!

@5225225
Copy link
Contributor Author

5225225 commented Jan 18, 2022

(This was fuzzed directly against the #564 PR, commit 209b248)

@marcusklaas
Copy link
Collaborator

This should be fixed by that PR now as well. I have since fuzzed myself for a few hours, and found nothing!

@5225225
Copy link
Contributor Author

5225225 commented Jan 25, 2022

Cool! Probably best to get that PR in sooner than later, there may be more bugs, but long running PRs are no fun, personally.

Your call, but I tend to avoid em.

@marcusklaas
Copy link
Collaborator

I am in agreement with you. I will ask Raph Levien if he has time to review when he has time.

@marcusklaas
Copy link
Collaborator

Merged! Thanks again for helping us get started with fuzzing :)

If you find any more, please do send em to us!

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

2 participants