1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
| | ## Fuzzing with AFL++ (https://aflplus.plus/)
1. In the top directory rebuild passt with AFL instrumentation, Clang
and ASAN:
```
make clean
AFL_USE_ASAN=1 make CC=/usr/bin/afl-clang-fast passt
```
2. In the fuzzing/ subdirectory, build the fuzzing wrapper *without*
instrumentation:
```
cd fuzzing
make fuzz-wrapper
```
3. Run AFL++
Create `fuzzing/sync_dir` and run multiple copies of afl-fuzz.
Usually you should run 1 master (-M) and as many slaves (-S) as you
can.
Master:
```
cd fuzzing
mkdir -p sync_dir
export AFL_SKIP_BIN_CHECK=1
export AFL_NO_FORKSRV=1
afl-fuzz -i testcase_dir -o sync_dir -M fuzz01 ./fuzz-wrapper @@
```
Slaves:
```
cd fuzzing
export AFL_SKIP_BIN_CHECK=1
export AFL_NO_FORKSRV=1
# replace fuzzNN with fuzz02, fuzz03, etc.
afl-fuzz -i testcase_dir -o sync_dir -S fuzzNN ./fuzz-wrapper @@
```
|