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

Panic while decompressing #12

Closed
frewsxcv opened this issue Oct 26, 2015 · 2 comments
Closed

Panic while decompressing #12

frewsxcv opened this issue Oct 26, 2015 · 2 comments
Assignees
Labels

Comments

@frewsxcv
Copy link
Contributor

extern crate brotli;

use std::io::Read;
use brotli::Decompressor;

fn main() {
    let mut input = vec![];
    let _ = Decompressor::new(&b"\x51\xac\x00\x48\x2f\x73\x14\x01\x14\x00\x00\x01\x00\x14\x14\xff\x00\x02\x00\x00\x00\x00\x00\x64\x14\x24\x14\x14\x14\x14\x14\x80\x00\x00\x14\xff\xff\x00\x00\x14\x14\x14\x14\x14\x14\x80\x00\x80".to_vec() as &[u8]).read_to_end(&mut input);
}

Crash discovered using afl.rs

@ende76 ende76 added the bug label Oct 26, 2015
@ende76 ende76 self-assigned this Oct 26, 2015
@ende76
Copy link
Owner

ende76 commented Oct 26, 2015

I'm repeating myself, but I still can't believe how valuable afl is…
I tried setting it up on my machine, but failed to get it to work, even after compiling rustc from source. I was a bit hesitant to abandon my multirust install, but maybe I need to go all the way from source.
It does seem like afl would be worth it.

@ende76 ende76 closed this as completed Oct 26, 2015
@frewsxcv
Copy link
Contributor Author

If you install Vagrant, you can use the Vagrantfile that lives in the repo. It'll set up Rust, Cargo, and AFL to versions that are confirmed to work with afl.rs; this is how I am testing everything. I'm planning to write better documentation and a tutorial sometime this week for it to explain how to set it up and use it step by step. Let me know if you need any help!

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

No branches or pull requests

2 participants