Skip to content

Commit aa7993d

Browse files
domenukktokatoka
andauthored
Some AFL UI example fuzzer cleanup (#1529)
* Some afl ui cleanup * more info * Fix CI (#1549) * Change profiles for the fuzzbench fuzzers. * just foreground * Revert "just foreground" This reverts commit abd4fbe. * fix Makefile.toml * Tmate debug * fix? * fix? * Can't fix this * remove reset --------- Co-authored-by: Dongjia "toka" Zhang <[email protected]>
1 parent c103444 commit aa7993d

File tree

12 files changed

+23
-24
lines changed

12 files changed

+23
-24
lines changed

fuzzers/libfuzzer_libpng_AFLStyle_UI/Makefile.toml renamed to fuzzers/libfuzzer_libpng_aflpp_ui/Makefile.toml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,26 +159,19 @@ windows_alias = "unsupported"
159159
script_runner = "@shell"
160160
script='''
161161
rm -rf libafl_unix_shmem_server || true
162-
(timeout 11s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true) &
162+
(timeout --foreground 11s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true) &
163163
sleep 0.2
164-
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
165-
cd ./corpus
166-
if [ $(ls -al |grep "^-"|wc -l) -gt 4 ]; then
167-
echo "Fuzzer is working"
168-
else
169-
echo "Fuzzer does not generate any testcases or any crashes"
170-
exit 1
171-
fi
164+
timeout --foreground 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
172165
'''
173166
dependencies = [ "fuzzer" ]
174167

175168
[tasks.test_mac]
176169
script_runner = "@shell"
177170
script='''
178171
rm -rf libafl_unix_shmem_server || true
179-
(timeout 11s ./${FUZZER_NAME} >fuzz_stdout.log 2>/dev/null || true) &
172+
(timeout --foreground 11s ./${FUZZER_NAME} >fuzz_stdout.log 2>/dev/null || true) &
180173
sleep 0.2
181-
timeout 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
174+
timeout --foreground 10s ./${FUZZER_NAME} >/dev/null 2>/dev/null || true
182175
'''
183176
dependencies = [ "fuzzer" ]
184177

fuzzers/libfuzzer_libpng_AFLStyle_UI/README.md renamed to fuzzers/libfuzzer_libpng_aflpp_ui/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
# Libfuzzer for libpng
1+
# Libfuzzer for libpng, with AFL-style UI
22

33
This folder contains an example fuzzer for libpng, using LLMP for fast multi-process fuzzing and crash detection.
44

5-
In contrast to other fuzzer examples, this setup uses `fuzz_loop_for`, to occasionally respawn the fuzzer executor.
6-
While this costs performance, it can be useful for targets with memory leaks or other instabilities.
7-
If your target is really instable, however, consider exchanging the `InProcessExecutor` for a `ForkserverExecutor` instead.
8-
9-
It also uses the `introspection` feature, printing fuzzer stats during execution.
10-
11-
To show off crash detection, we added a `ud2` instruction to the harness, edit harness.cc if you want a non-crashing example.
12-
It has been tested on Linux.
5+
In contrast to other fuzzer examples, it keeps track of AFL style metrics and display them in the terminal.
136

147
## Build
158

0 commit comments

Comments
 (0)