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

Fork server handshake failed issue on Jil.dll #19

Closed
jackbourkemckenna opened this issue Sep 17, 2021 · 4 comments
Closed

Fork server handshake failed issue on Jil.dll #19

jackbourkemckenna opened this issue Sep 17, 2021 · 4 comments

Comments

@jackbourkemckenna
Copy link

Hi,

I have been having the same problems as this closed issue: #16

I've been trying to run the following example from ReadMe I get the following error:

jack@DESKTOP-HPQQTM1:~/test$ afl-fuzz  -i testcases -o Findings3 -m none -t 5000 dotnet bin/Debug/netcoreapp2.1/SharpFuzz.dll
afl-fuzz 2.52b by <lcamtuf@google.com>
[+] You have 16 CPU cores and 1 runnable tasks (utilization: 6%).
[+] Try parallel jobs - see /usr/local/share/doc/afl/parallel_fuzzing.txt.
[*] Checking CPU core loadout...
[+] Found a free CPU core, binding to #0.
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning 'testcases'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Validating target binary...
[*] Attempting dry run with 'id:000000,orig:Test.json'...
[*] Spinning up the fork server...

[-] Hmm, looks like the target binary terminated before we could complete a
    handshake with the injected code. Perhaps there is a horrible bug in the
    fuzzer. Poke <lcamtuf@coredump.cx> for troubleshooting tips.
�
[-] PROGRAM ABORT : Fork server handshake failed
         Location : init_forkserver(), afl-fuzz.c:2253

From reading the documentation I also tried running afl-fuzzer with the following parameter -Q. Doing it this way does not trow a fork server handshake error but just hangs with Fork Server is Running:

afl-fuzz  -i testcases -o Findings3 -m none -t 5000 -Q dotnet bin/Debug/netcoreapp2.1/SharpFuzz.dll
afl-fuzz 2.52b by <lcamtuf@google.com>
[+] You have 16 CPU cores and 1 runnable tasks (utilization: 6%).
[+] Try parallel jobs - see /usr/local/share/doc/afl/parallel_fuzzing.txt.
[*] Checking CPU core loadout...
[+] Found a free CPU core, binding to #0.
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning 'testcases'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Validating target binary...
[*] Attempting dry run with 'id:000000,orig:Test.json'...
[*] Spinning up the fork server...
[+] All right - fork server is up. 

Running this on WSL ubuntu, Any help resolving this problem would be great.

@TroyCornwall
Copy link

I had this issue until I used -m 10000

My run command was afl-fuzz -i input -o output -m 10000 -t 5000 dotnet bin/Debug/net6.0/fuzztest.dll

@gfarida
Copy link

gfarida commented Jun 3, 2022

I run this command with (-m 10000) and it doesn't help: afl-fuzz -i in -o out -m 10000 -t 5000 dotnet bin/Debug/netcoreapp2.2/FuzzTest.dll
afl-fuzz 2.52b by lcamtuf@google.com
[+] You have 8 CPU cores and 2 runnable tasks (utilization: 25%).
[+] Try parallel jobs - see /usr/local/share/doc/afl/parallel_fuzzing.txt.
[] Checking CPU core loadout...
[+] Found a free CPU core, binding to #0.
[
] Checking core_pattern...
[] Checking CPU scaling governor...
[
] Setting up output directories...
[] Scanning 'in'...
[+] No auto-generated dictionary tokens to reuse.
[
] Creating hard links for all input files...
[] Validating target binary...
[
] Attempting dry run with 'id:000000,orig:1.json'...
[*] Spinning up the fork server...

[-] 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 (9.77 GB) 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 $[9999 << 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.

[-] PROGRAM ABORT : Fork server handshake failed
Location : init_forkserver(), afl-fuzz.c:2253

What is wrong?

@gr4ysku11
Copy link

I'm also experiencing this issue, not sure what the problem is...
Win10x64 (Debian WSL)

@gr4ysku11
Copy link

Nevermind, figured it out. Apparently I didn't have .Net Core installed in my WSL environment...
apt install dotnet-sdk-3.1

I was getting tripped up because I'm coding/compiling in Visual Studio but running everything in WSL.

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

5 participants