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

quick-xml fuzz target finds panic very fast #14

Closed
frewsxcv opened this issue Mar 4, 2017 · 8 comments
Closed

quick-xml fuzz target finds panic very fast #14

frewsxcv opened this issue Mar 4, 2017 · 8 comments

Comments

@frewsxcv
Copy link
Member

frewsxcv commented Mar 4, 2017

  1. run quick-xml fuzz target
  2. panic is found within a minute

i haven't had time to open an issue on the quick-xml repo, so if someone wants to do that, go for it!

@Manishearth
Copy link
Member

tafia/quick-xml#53

@tafia
Copy link

tafia commented Mar 6, 2017

Thanks for the issue, I've fixed it.

I then tried to run fuzz again but I got this error after initializing:

$ cargo fuzz run fuzzer_script_1
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=3 -Zsanitizer=address -Cpanic=abort --crate-type bin --crate-type rlib --target x86_64-unknown-linux-gnu` (exit code: 101)
--- stderr
error: unknown debugging option: `sanitizer`

$ rustc -V
rustc 1.17.0-nightly (ea7a6486a 2017-02-04)

@frewsxcv
Copy link
Member Author

frewsxcv commented Mar 6, 2017

You'll need a newer nightly. I think one after Feb 10

@tafia
Copy link

tafia commented Mar 6, 2017

Thanks for the quick answer. I'll try that

@tafia
Copy link

tafia commented Mar 6, 2017

It is better but I have another error now:

Compiling backtrace v0.3.0
     Running `/export/home/jtuffe/projects/quick-xml/fuzz/target/debug/build/backtrace-3d4946c28f21721b/build-script-build`
error: failed to run custom build command for `libfuzzer-sys v0.1.0 (https://github.com/rust-fuzz/libfuzzer-sys.git#9d00b47e)`
process didn't exit successfully: `/export/home/jtuffe/projects/quick-xml/fuzz/target/debug/build/libfuzzer-sys-23dbcd1b1d8dfdcf/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CXX_x86_64-unknown-linux-gnu = None
CXX_x86_64_unknown_linux_gnu = None
HOST_CXX = None
CXX = None
HOST = Some("x86_64-unknown-linux-gnu")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CXXFLAGS_x86_64-unknown-linux-gnu = None
CXXFLAGS_x86_64_unknown_linux_gnu = None
HOST_CXXFLAGS = None
CXXFLAGS = None
PROFILE = Some("debug")
running: "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-m64" "-std=c++11" "-fno-omit-frame-pointer" "-o" "/export/home/jtuffe/projects/quick-xml/fuzz/target/x86_64-unknown-linux-gnu/debug/build/libfuzzer-sys-6a40a3a7866313d1/out/src/FuzzerShmemPosix.o" "-c" "src/FuzzerShmemPosix.cpp"
cargo:warning=cc1plus: error: unrecognized command line option "-std=c++11"
ExitStatus(ExitStatus(256))


command did not execute successfully, got: exit code: 1



--- stderr
thread 'main' panicked at 'explicit panic', /home/jtuffe/.cargo/registry/src/github.com-1ecc6299db9ec823/gcc-0.3.43/src/lib.rs:1127
note: Run with `RUST_BACKTRACE=1` for a backtrace.

$ rustc -V
rustc 1.17.0-nightly (b1e31766d 2017-03-03)

$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@frewsxcv
Copy link
Member Author

frewsxcv commented Mar 6, 2017

You'll need a C++ compiler that supports C++11. The latest stable versions of clang++ and g++ support that, not sure when it was added

@tafia
Copy link

tafia commented Mar 6, 2017

I think it will be too complicated to have it installed at work.
I'll try it at home then. No big deal but it might be good to mention this on the readme.
Thanks!

@tafia
Copy link

tafia commented Mar 6, 2017

Just to let you know I've successfully ran cargo-fuzz at home.

Guess what: It found another bug! (then I stopped it after 30 mins).
Thanks again!

frewsxcv added a commit to rust-fuzz/cargo-fuzz that referenced this issue Mar 6, 2017
bors bot added a commit to rust-fuzz/cargo-fuzz that referenced this issue Mar 30, 2017
71: Add another quick-xml trophy. r=frewsxcv
rust-fuzz/targets#14 (comment)
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

3 participants