-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Can ASAN_OPTIONS be configured when running fuzzers? #3316
Comments
This may also just boil down to #675, although I wasn't certain about the current state of that bug since removing |
I think it's doable via |
Also, need to evaluate whether this might be a general issue for Rust fuzzing. In that case google/clusterfuzz#1407 would be a good place to discuss / track it. |
Thanks for the info @Dor1s! Digging in it looks like that file is used to pass options to the sanitizer (e.g. I may be a bit confused though because the CLI flags seem like they're a bit different from Also FWIW this is unlikely to be Rust-specific but rather JIT/wasm specific which use signals for these things, although I could be wrong! |
I was checking the code yesterday, I think this can be achieved by adding
Thanks for claryfing that this is not Rust specific in general -- that's good :) |
This is an attempt to apply the suggestions from google#3316 to the fuzzing infrastructure for the `wasmtime` target. This will hopefully allow the delivery of SIGSEGV and SIGILL signals to the `wasmtime` program itself. These are expected signals when executing wasm code so we don't want the fuzzer to treat all forms of the signal as a fatal error.
This is an attempt to apply the suggestions from #3316 to the fuzzing infrastructure for the `wasmtime` target. This will hopefully allow the delivery of SIGSEGV and SIGILL signals to the `wasmtime` program itself. These are expected signals when executing wasm code so we don't want the fuzzer to treat all forms of the signal as a fatal error.
Ok thanks again for your help @Dor1s! Looks like everything is ship shape now and this is taken care of! |
We've recently added the
wasmtime
project to oss-fuzz. Thewasmtime
project is a WebAssembly JIT compiler and runtime for a bit of background, and we've been getting some interesting fuzz bug reports which I think may be related to ASAN_OPTIONS a bit.It looks like ASAN_OPTIONS for our runs has configuration like
allow_user_segv_handler=0
orhandle_sigill=1
. The JIT, however, uses segfaults to detect out-of-bounds memory reads/writes and we useud2
/SIGILL
to implement theunreachable
WebAssembly instruction. In other words we installSIGSEGV
andSIGILL
signal handlers and end up handling any signals coming from wasm. (although we try to forward any non-wasm-originating signals to the previous handler or the OS)Is it possible to configure ASAN_OPTIONS when the fuzzers are running to tweak these options? I'm not entirely well-versed on the internals of libfuzzer here and what's going on. We've been unable to reproduce any of the fuzz bugs found locally, but as soon as I set the same
ASAN_OPTIONS
as we found in the build logs the bugs reproduced very quickly. I believe that means that if we removeASAN_OPTIONS
entirely we should be able to work just fine.In any case I wanted to ask here to see what our various options were (if any) for handling these issues!
The text was updated successfully, but these errors were encountered: