|
5 | 5 | Originally written by Michal Zalewski
|
6 | 6 |
|
7 | 7 | Now maintained by Marc Heuse <[email protected]>,
|
8 |
| - Heiko Eißfeldt <[email protected]>, |
9 |
| - Andrea Fioraldi <[email protected]>, |
10 | 8 |
|
| 9 | + Andrea Fioraldi <[email protected]>, |
| 10 | + Heiko Eissfeldt <[email protected]>, |
11 | 11 |
|
12 | 12 | Copyright 2016, 2017 Google Inc. All rights reserved.
|
13 |
| - Copyright 2019-2021 AFLplusplus Project. All rights reserved. |
| 13 | + Copyright 2019-2024 AFLplusplus Project. All rights reserved. |
14 | 14 |
|
15 | 15 | Licensed under the Apache License, Version 2.0 (the "License");
|
16 | 16 | you may not use this file except in compliance with the License.
|
|
26 | 26 | /* Version string: */
|
27 | 27 |
|
28 | 28 | // c = release, a = volatile github dev, e = experimental branch
|
29 |
| -#define VERSION "++3.15a" |
| 29 | +#define VERSION "++4.20a" |
30 | 30 |
|
31 | 31 | /******************************************************
|
32 | 32 | * *
|
|
43 | 43 | Default: 8MB (defined in bytes) */
|
44 | 44 | #define DEFAULT_SHMEM_SIZE (8 * 1024 * 1024)
|
45 | 45 |
|
| 46 | +/* Default time until when no more coverage finds are happening afl-fuzz |
| 47 | + switches to exploitation mode. It automatically switches back when new |
| 48 | + coverage is found. |
| 49 | + Default: 300 (seconds) */ |
| 50 | +#define STRATEGY_SWITCH_TIME 1000 |
| 51 | + |
46 | 52 | /* Default file permission umode when creating files (default: 0600) */
|
47 | 53 | #define DEFAULT_PERMISSION 0600
|
48 | 54 |
|
| 55 | +/* SkipDet's global configuration */ |
| 56 | + |
| 57 | +#define MINIMAL_BLOCK_SIZE 64 |
| 58 | +#define SMALL_DET_TIME (60 * 1000 * 1000U) |
| 59 | +#define MAXIMUM_INF_EXECS (16 * 1024U) |
| 60 | +#define MAXIMUM_QUICK_EFF_EXECS (64 * 1024U) |
| 61 | +#define THRESHOLD_DEC_TIME (20 * 60 * 1000U) |
| 62 | + |
| 63 | +/* Set the Prob of selecting eff_bytes 3 times more than original, |
| 64 | + Now disabled */ |
| 65 | +#define EFF_HAVOC_RATE 3 |
| 66 | + |
49 | 67 | /* CMPLOG/REDQUEEN TUNING
|
50 | 68 | *
|
51 | 69 | * Here you can modify tuning and solving options for CMPLOG.
|
|
54 | 72 | *
|
55 | 73 | */
|
56 | 74 |
|
57 |
| -/* if TRANSFORM is enabled with '-l T', this additionally enables base64 |
58 |
| - encoding/decoding */ |
59 |
| -// #define CMPLOG_SOLVE_TRANSFORM_BASE64 |
60 |
| - |
61 | 75 | /* If a redqueen pass finds more than one solution, try to combine them? */
|
62 | 76 | #define CMPLOG_COMBINE
|
63 | 77 |
|
64 | 78 | /* Minimum % of the corpus to perform cmplog on. Default: 10% */
|
65 | 79 | #define CMPLOG_CORPUS_PERCENT 5U
|
66 | 80 |
|
67 | 81 | /* Number of potential positions from which we decide if cmplog becomes
|
68 |
| - useless, default 8096 */ |
| 82 | + useless, default 12288 */ |
69 | 83 | #define CMPLOG_POSITIONS_MAX (12 * 1024)
|
70 | 84 |
|
71 |
| -/* Maximum allowed fails per CMP value. Default: 128 */ |
| 85 | +/* Maximum allowed fails per CMP value. Default: 96 */ |
72 | 86 | #define CMPLOG_FAIL_MAX 96
|
73 | 87 |
|
74 | 88 | /* -------------------------------------*/
|
|
81 | 95 | will be kept and written to the crash/ directory as RECORD:... files.
|
82 | 96 | Note that every crash will be written, not only unique ones! */
|
83 | 97 |
|
84 |
| -//#define AFL_PERSISTENT_RECORD |
| 98 | +// #define AFL_PERSISTENT_RECORD |
| 99 | + |
| 100 | +/* Adds support in compiler-rt to replay persistent records in @@-style |
| 101 | + * harnesses */ |
| 102 | + |
| 103 | +// #define AFL_PERSISTENT_REPLAY_ARGPARSE |
85 | 104 |
|
86 | 105 | /* console output colors: There are three ways to configure its behavior
|
87 | 106 | * 1. default: colored outputs fixed on: defined USE_COLOR && defined
|
|
118 | 137 |
|
119 | 138 | // #define _WANT_ORIGINAL_AFL_ALLOC
|
120 | 139 |
|
121 |
| -/* Comment out to disable fancy ANSI boxes and use poor man's 7-bit UI: */ |
| 140 | +/* Comment out to disable fancy boxes and use poor man's 7-bit UI: */ |
122 | 141 |
|
123 |
| -#ifndef ANDROID_DISABLE_FANCY // Fancy boxes are ugly from adb |
| 142 | +#ifndef DISABLE_FANCY |
124 | 143 | #define FANCY_BOXES
|
125 | 144 | #endif
|
126 | 145 |
|
|
153 | 172 | /* Number of calibration cycles per every new test case (and for test
|
154 | 173 | cases that show variable behavior): */
|
155 | 174 |
|
156 |
| -#define CAL_CYCLES 8U |
157 |
| -#define CAL_CYCLES_LONG 20U |
| 175 | +#define CAL_CYCLES_FAST 3U |
| 176 | +#define CAL_CYCLES 7U |
| 177 | +#define CAL_CYCLES_LONG 12U |
158 | 178 |
|
159 | 179 | /* Number of subsequent timeouts before abandoning an input file: */
|
160 | 180 |
|
|
289 | 309 |
|
290 | 310 | #define UI_TARGET_HZ 5
|
291 | 311 |
|
292 |
| -/* Fuzzer stats file and plot update intervals (sec): */ |
| 312 | +/* Fuzzer stats file, queue stats and plot update intervals (sec): */ |
293 | 313 |
|
294 | 314 | #define STATS_UPDATE_SEC 60
|
295 | 315 | #define PLOT_UPDATE_SEC 5
|
| 316 | +#define QUEUE_UPDATE_SEC 1800 |
296 | 317 |
|
297 | 318 | /* Smoothing divisor for CPU load and exec speed stats (1 - no smoothing). */
|
298 | 319 |
|
|
352 | 373 | 65535, /* Overflow unsig 16-bit when incremented */ \
|
353 | 374 | 65536, /* Overflow unsig 16 bit */ \
|
354 | 375 | 100663045, /* Large positive number (endian-agnostic) */ \
|
| 376 | + 2139095040, /* float infinite */ \ |
355 | 377 | 2147483647 /* Overflow signed 32-bit when incremented */
|
356 | 378 |
|
357 |
| -#define INTERESTING_32_LEN 8 |
| 379 | +#define INTERESTING_32_LEN 9 |
358 | 380 |
|
359 | 381 | /***********************************************************
|
360 | 382 | * *
|
361 | 383 | * Really exotic stuff you probably don't want to touch: *
|
362 | 384 | * *
|
363 | 385 | ***********************************************************/
|
364 | 386 |
|
365 |
| -/* Call count interval between reseeding the libc PRNG from /dev/urandom: */ |
| 387 | +/* Call count interval between reseeding the PRNG from /dev/urandom: */ |
366 | 388 |
|
367 |
| -#define RESEED_RNG 100000 |
| 389 | +#define RESEED_RNG 2500000 |
368 | 390 |
|
369 | 391 | /* The default maximum testcase cache size in MB, 0 = disable.
|
370 | 392 | A value between 50 and 250 is a good default value. Note that the
|
|
438 | 460 | after changing this - otherwise, SEGVs may ensue. */
|
439 | 461 |
|
440 | 462 | #define MAP_SIZE_POW2 16
|
| 463 | + |
| 464 | +/* Do not change this unless you really know what you are doing. */ |
| 465 | + |
441 | 466 | #define MAP_SIZE (1U << MAP_SIZE_POW2)
|
| 467 | +#if MAP_SIZE <= 65536 |
| 468 | + #define MAP_INITIAL_SIZE (2 << 20) // = 2097152 |
| 469 | +#else |
| 470 | + #define MAP_INITIAL_SIZE MAP_SIZE |
| 471 | +#endif |
442 | 472 |
|
443 | 473 | /* Maximum allocator request size (keep well under INT_MAX): */
|
444 | 474 |
|
|
489 | 519 |
|
490 | 520 | #define AFL_TXT_MIN_LEN 12
|
491 | 521 |
|
| 522 | +/* Maximum length of a queue input to be evaluated for "is_ascii"? */ |
| 523 | + |
| 524 | +#define AFL_TXT_MAX_LEN 65535 |
| 525 | + |
492 | 526 | /* What is the minimum percentage of ascii characters present to be classifed
|
493 | 527 | as "is_ascii"? */
|
494 | 528 |
|
495 |
| -#define AFL_TXT_MIN_PERCENT 94 |
| 529 | +#define AFL_TXT_MIN_PERCENT 99 |
496 | 530 |
|
497 | 531 | /* How often to perform ASCII mutations 0 = disable, 1-8 are good values */
|
498 | 532 |
|
|
0 commit comments