Gramatron icon indicating copy to clipboard operation
Gramatron copied to clipboard

After the script “run_campaign.sh” is executed, the message "illegal instruction" is displayed

Open WhereIsOops opened this issue 4 years ago • 5 comments

I followed the how-to guide to install in docker,but something wrong happend as fllow: [GF] Automaton file passed:/root/grammars/ruby/source_automata.json Final=6 Init=0 NumStates=20 [+] afl++ is maintained by Marc "van Hauser" Heuse, Heiko "hexcoder" Eißfeldt, Andrea Fioraldi and Dominik Maier [+] afl++ is open source, get it at https://github.com/AFLplusplus/AFLplusplus [+] Power schedules from github.com/mboehme/aflfast [+] Python Mutator and llvm_mode instrument file list from github.com/choller/afl [+] MOpt Mutator from github.com/puppet-meteor/MOpt-AFL [+] Loaded environment variable AFL_DISABLE_TRIM with value 1 [] Getting to work... [+] Using exploration-based constant power schedule (EXPLORE, default) [+] You have 4 CPU cores and 1 runnable tasks (utilization: 25%). [+] Try parallel jobs - see docs/parallel_fuzzing.md. [] Checking CPU core loadout... [+] Found a free CPU core, try binding to #0. [] Checking core_pattern... [!] WARNING: Could not check CPU scaling governor [] Setting up output directories... [+] Output directory exists but deemed OK to reuse. [] Deleting old session data... [+] Output dir cleanup successful. [] Loading custom mutator library from '/root/gramatron_src/afl-gf/custom_mutators/gramfuzz/gramfuzz-mutator.so'... [] optional symbol 'afl_custom_post_process' not found. [] optional symbol 'afl_custom_init_trim' not found. [] optional symbol 'afl_custom_trim' not found. [] optional symbol 'afl_custom_post_trim' not found. [] optional symbol 'afl_custom_havoc_mutation' not found. [] optional symbol 'afl_custom_havoc_mutation_probability' not found. [+] Custom mutator '/root/gramatron_src/afl-gf/custom_mutators/gramfuzz/gramfuzz-mutator.so' installed successfully.

Read testcases executing[] Scanning '/tmp/inputs'... [+] No auto-generated dictionary tokens to reuse. [] Creating hard links for all input files... [] Validating target binary... [] Attempting dry run with 'id:000000,time:0,orig:001'...

Read length:288[] Spinning up the fork server... [+] All right - fork server is up. [] Target map size: 15680 ./run_campaign.sh: line 34: 1607 Illegal instruction (core dumped) $FUZZ_MAIN -m none -a $AUTOMATON -i $INPUT_DIR -o $OUTPUT_DIR -- $RUNCMD

my host OS is Linux ubun2004 5.4.0-92-generic #103-Ubuntu SMP Fri Nov 26 16:13:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

WhereIsOops avatar Dec 23 '21 03:12 WhereIsOops

My docerk images is gramatron:focal

WhereIsOops avatar Dec 23 '21 07:12 WhereIsOops

My docerk images is gramatron:focal

And then I manually export Environment Variables, bash run ../afl-gf/afl-fuzz -a ~/grammars/ruby/source_automata.json -i /tmp/inputs -o test_output -- /tmp/mruby/bin/mruby @@ [+] Python Mutator and llvm_mode instrument file list from github.com/choller/afl [+] MOpt Mutator from github.com/puppet-meteor/MOpt-AFL [+] Loaded environment variable AFL_DISABLE_TRIM with value 1 [] Getting to work... [+] Using exploration-based constant power schedule (EXPLORE, default) [+] You have 4 CPU cores and 1 runnable tasks (utilization: 25%). [+] Try parallel jobs - see docs/parallel_fuzzing.md. [] Checking CPU core loadout... [+] Found a free CPU core, try binding to #0. [] Checking core_pattern... [!] WARNING: Could not check CPU scaling governor [] Setting up output directories... [+] Output directory exists but deemed OK to reuse. [] Deleting old session data... [+] Output dir cleanup successful. [] Loading custom mutator library from '/root/gramatron_src/gramfuzz-mutator/gramfuzz-mutator.so'... [] optional symbol 'afl_custom_post_process' not found. [] optional symbol 'afl_custom_init_trim' not found. [] optional symbol 'afl_custom_trim' not found. [] optional symbol 'afl_custom_post_trim' not found. [] optional symbol 'afl_custom_havoc_mutation' not found. [] optional symbol 'afl_custom_havoc_mutation_probability' not found. [+] Custom mutator '/root/gramatron_src/gramfuzz-mutator/gramfuzz-mutator.so' installed successfully.

Read testcases executing[] Scanning '/tmp/inputs'... [+] No auto-generated dictionary tokens to reuse. [] Creating hard links for all input files... [] Validating target binary... [] Attempting dry run with 'id:000000,time:0,orig:001'...

Read length:216[*] Spinning up the fork server...

[-] Whoops, the target binary crashed suddenly, before receiving any input from the fuzzer! Since it seems to be built with ASAN and you have a restrictive memory limit configured, this is expected; please read docs/notes_for_asan.md for help.

[-] PROGRAM ABORT : Fork server crashed with signal 6 Location : afl_fsrv_start(), src/afl-forkserver.c:771 Why did your changes to afl cause a crash?

WhereIsOops avatar Dec 23 '21 07:12 WhereIsOops

I met the same problem. I'm running on WSL2 with Ubuntu 20.04.

aDobeZ avatar Feb 07 '22 04:02 aDobeZ

Has someone meanwhile the solution for the problem ?

HuntUse avatar Sep 25 '22 21:09 HuntUse

I just cleaned and rebuilt from source and it fixed this issue.

dkoch144 avatar Mar 07 '23 16:03 dkoch144