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

Fuzzy testing brainstorming #206

Open
eerimoq opened this issue Jan 17, 2019 · 0 comments
Open

Fuzzy testing brainstorming #206

eerimoq opened this issue Jan 17, 2019 · 0 comments

Comments

@eerimoq
Copy link
Owner

eerimoq commented Jan 17, 2019

Below is the output from a short brainstorming session on introducing fuzzy testing as part of Simba. Will it be useful or just a time consuming activity nobody want to use? Ideally the fuzzy testing will not only test for memory corruption and security related issues, but also the application logic as a whole.

  • Sections data_fuzzer and bss_fuzzer that can be reinitialized for each new fuzzed data. Eliminates the need for cleanup functions clobbering the application. Use objcopy (or other tool) to rename sections. binutils linker creates __start_<section> and __stop_<section> symbols.

  • setjmp()/longjump() instead of pthreads in kernel port. Deterministic and no memory leaks. Will it work? Maybe use https://en.wikipedia.org/wiki/Setcontext?

  • System tick called based of fuzzed data. Increment 0-255 times to start with. Maybe increment with a number of milliseconds instead for better application compatibility.

  • Use libFuzzer.

  • New port called libfuzzer.

  • Create an example application with LLVMFuzzerTestOneInput().

  • Goals:

    • Fast.

    • Deterministic.

    • Minimal user effort.

  • Test external interfaces, not individual modules and function calls. Use manually written unit tests to test individual modules and function calls.

  • How to input data into the application? Automatic in drivers? What does the user have to do? What does the user want to do?

  • Need clang support in build system.

  • Enable sanitizers.

  • Run fuzzer until the code coverage is high. Then run only the corpus and save output data. Possibly create a testcase validating the output.

  • No randomization allowed in the application. The same fuzzed input data must always produce the same output.

  • How long will it take to fuzz the average sized application? Minutes? Hours? Years?

  • Does any already existing fuzzer tool meet the requirements? honggfuzz? afl?

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

1 participant