Skip to content

Init files for fuzzing #339

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

Merged
merged 5 commits into from
Dec 9, 2020
Merged

Init files for fuzzing #339

merged 5 commits into from
Dec 9, 2020

Conversation

darrenldl
Copy link
Contributor

@darrenldl darrenldl commented Dec 8, 2020

Spawned from #338

Adds the following fuzzing tests:

@c-cube
Copy link
Owner

c-cube commented Dec 8, 2020

I get this after trying to call run.sh:

[-] Hmm, looks like the target binary terminated before we could complete a
    handshake with the injected code. There are two probable explanations:

    - The current memory limit (50.0 MB) is too restrictive, causing an OOM
      fault in the dynamic linker. This can be fixed with the -m option. A
      simple way to confirm the diagnosis may be:

      ( ulimit -Sv $[49 << 10]; /path/to/fuzzed_app )

      Tip: you can use http://jwilk.net/software/recidivm to quickly
      estimate the required amount of virtual memory for the binary.

    - Less likely, there is a horrible bug in the fuzzer. If other options
      fail, poke <lcamtuf@coredump.cx> for troubleshooting tips.

@darrenldl
Copy link
Contributor Author

Is that with both tests? Both run fine on my system : /

@darrenldl
Copy link
Contributor Author

I've increased the virtual memory allocated to 100MiB, but I'm not confident that's the issue.

@darrenldl
Copy link
Contributor Author

Aha, I managed to replicate that when I'm back to switch 4.08.1 instead of 4.08.1+afl - were you using a +afl switch when running the scripts?

@c-cube
Copy link
Owner

c-cube commented Dec 9, 2020

I'm using 4.11.1+afl, but maybe there's some opam state that has not been properly updated when I upgraded my switch.

@darrenldl
Copy link
Contributor Author

Both tests still run fine for me after switching to 4.11.1+afl, hm...

@c-cube
Copy link
Owner

c-cube commented Dec 9, 2020

It was my fault, sorry. I thought I had 4.11.1+afl, but it turns out opam had rejected my pin (I needed opam pin ocaml-variants 4.11.1+afl --unlock-base) so I had a vanilla 4.11.

This seems to work, it's fuzzing right now!! 😁

@c-cube c-cube merged commit c8d0c60 into c-cube:master Dec 9, 2020
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

Successfully merging this pull request may close these issues.

2 participants