-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add optional error handling #12
Comments
Hi there
awesome, thanks! May I ask how it comes that you are fuzzing my library? Can you be more specific at which parts the panics occur? This is not a |
I'm writing bootloader for my research security-oriented OS project. I thought it would be a great idea to store kernel and initramfs in tar archive and just append signature for verification on bottom, so I just picked this library. My bootloader implements fancy error handling, and I wanted to display if something with tar_no_std is wrong. Initially I thought that tar_no_std will just return
|
Very similar to my original use case I had when I created this repo. Cool! |
@phip1611 I ran AFL for a minute and it found 31 unique panics (from 50k lauches). This is test case: let archive = TarArchiveRef::new(data);
match archive {
Ok(entries) => println!("{:#?}", entries.entries().collect::<Vec<_>>()),
Err(err) => println!("{:#?}", err),
} These files cause tar_no_std to panic (I used latest dev2 revision): |
I think the latest version on |
It's not. |
Can you check these inputs? |
I ran #[test]
fn test_foo() {
let data =include_bytes!("./crashes.tar");
let archive = TarArchiveRef::new(data).unwrap();
let x = archive.entries().collect::<Vec<_>>();
dbg!(x);
} with the following output
So I'm not sure where the problem is? |
This is just archive that contains files that trigger panic. Try to unpack it and then read from, for example |
Ah, got it. Sorry |
@phip1611 Can you reopen? |
Thanks very much. Your tarball collection now runs in CI. #17 |
Currently
tar_no_std
panics when reads malformed data. (I tried fuzzing it and I found a bunch of different errors)It is not quite good when we have some untrusted source of data (for example, network).
The text was updated successfully, but these errors were encountered: