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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
/*
american fuzzy lop - vaguely configurable bits
----------------------------------------------
Written and maintained by Michal Zalewski <lcamtuf@google.com>
Copyright 2013, 2014, 2015, 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
*/
/* Version string: */
/******************************************************
* *
* Settings that may be of interest to power users: *
* *
******************************************************/
/* Comment out to disable terminal colors (note that this makes afl-analyze
a lot less nice): */
/* Comment out to disable fancy ANSI boxes and use poor man's 7-bit UI: */
/* Default timeout for fuzzed code (milliseconds). This is the upper bound,
also used for detecting hangs; the actual value is auto-scaled: */
/* Timeout rounding factor when auto-scaling (milliseconds): */
/* Default memory limit for child process (MB): */
/* ^!__x86_64__ */
/* Default memory limit when running in QEMU mode (MB): */
/* Number of calibration cycles per every new test case (and for test
cases that show variable behavior): */
/* Number of subsequent timeouts before abandoning an input file: */
/* Maximum number of unique hangs or crashes to record: */
/* Baseline number of random tweaks during a single 'havoc' stage: */
/* Maximum multiplier for the above (should be a power of two, beware
of 32-bit int overflows): */
/* Absolute minimum number of havoc cycles (after all adjustments): */
/* Maximum stacking for havoc-stage tweaks. The actual value is calculated
like this:
n = random between 1 and HAVOC_STACK_POW2
stacking = 2^n
In other words, the default (n = 7) produces 2, 4, 8, 16, 32, 64, or
128 stacked tweaks: */
/* Caps on block sizes for cloning and deletion operations. Each of these
ranges has a 33% probability of getting picked, except for the first
two cycles where smaller blocks are favored: */
/* Extra-large blocks, selected very rarely (<5% of the time): */
/* Probabilities of skipping non-favored entries in the queue, expressed as
percentages: */
/* Splicing cycle count: */
/* Nominal per-splice havoc cycle length: */
/* Maximum offset for integer addition / subtraction stages: */
/* Limits for the test case trimmer. The absolute minimum chunk size; and
the starting and ending divisors for chopping up the input file: */
/* Maximum size of input file, in bytes (keep under 100MB): */
/* The same, for the test case minimizer: */
/* Block normalization steps for afl-tmin: */
/* Maximum dictionary token size (-x), in bytes: */
/* Length limits for auto-detected dictionary tokens: */
/* Maximum number of user-specified dictionary tokens to use in deterministic
steps; past this point, the "extras/user" step will be still carried out,
but with proportionally lower odds: */
/* Maximum number of auto-extracted dictionary tokens to actually use in fuzzing
(first value), and to keep in memory as candidates. The latter should be much
higher than the former. */
/* Scaling factor for the effector map used to skip some of the more
expensive deterministic steps. The actual divisor is set to
2^EFF_MAP_SCALE2 bytes: */
/* Minimum input file length at which the effector logic kicks in: */
/* Maximum effector density past which everything is just fuzzed
unconditionally (%): */
/* UI refresh frequency (Hz): */
/* Fuzzer stats file and plot update intervals (sec): */
/* Smoothing divisor for CPU load and exec speed stats (1 - no smoothing). */
/* Sync interval (every n havoc cycles): */
/* Output directory reuse grace period (minutes): */
/* Uncomment to use simple file names (id_NNNNNN): */
// #define SIMPLE_FILES
/* List of interesting values to use in fuzzing. */
/***********************************************************
* *
* Really exotic stuff you probably don't want to touch: *
* *
***********************************************************/
/* Call count interval between reseeding the libc PRNG from /dev/urandom: */
/* Maximum line length passed from GCC to 'as' and used for parsing
configuration files: */
/* Environment variable used to pass SHM ID to the called program. */
/* Other less interesting, internal-only variables. */
/* In-code signatures for deferred and persistent mode. */
/* Distinctive bitmap signature used to indicate failed execution: */
/* Distinctive exit code used to indicate MSAN trip condition: */
/* Designated file descriptors for forkserver commands (the application will
use FORKSRV_FD and FORKSRV_FD + 1): */
/* Fork server init timeout multiplier: we'll wait the user-selected
timeout plus this much for the fork server to spin up. */
/* Calibration timeout adjustments, to be a bit more generous when resuming
fuzzing sessions or trying to calibrate already-added internal finds.
The first value is a percentage, the other is in milliseconds: */
/* Number of chances to calibrate a case before giving up: */
/* Map size for the traced binary (2^MAP_SIZE_POW2). Must be greater than
2; you probably want to keep it under 18 or so for performance reasons
(adjusting AFL_INST_RATIO when compiling is probably a better way to solve
problems with complex programs). You need to recompile the target binary
after changing this - otherwise, SEGVs may ensue. */
/* Maximum allocator request size (keep well under INT_MAX): */
/* A made-up hashing seed: */
/* Constants for afl-gotcpu to control busy loop timing: */
/* Uncomment this to use inferior block-coverage-based instrumentation. Note
that you need to recompile the target binary for this to have any effect: */
// #define COVERAGE_ONLY
/* Uncomment this to ignore hit counts and output just one bit per tuple.
As with the previous setting, you will need to recompile the target
binary: */
// #define SKIP_COUNTS
/* Uncomment this to use instrumentation data to record newly discovered paths,
but do not use them as seeds for fuzzing. This is useful for conveniently
measuring coverage that could be attained by a "dumb" fuzzing algorithm: */
// #define IGNORE_FINDS
/* ! _HAVE_CONFIG_H */