Skip to content

Commit

Permalink
Tweak settings for AFL++ (#2208)
Browse files Browse the repository at this point in the history
- Change fuzz duration to 4 hr.
- Use AFL_EXPAND_HAVOC_NOW as per Marc's recommendation since we
  are working on saturated corpus most of the time.
  "Setting AFL_EXPAND_HAVOC_NOW will start in the extended havoc mode
  that includes costly mutations."
  • Loading branch information
inferno-chromium authored Jan 26, 2021
1 parent 40a7b1c commit ab77a57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/local/butler/scripts/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"""

AFL_TEMPLATE = """MAX_FUZZ_THREADS = 1
MAX_TESTCASES = 4
FUZZ_TEST_TIMEOUT = 4800
MAX_TESTCASES = 1
FUZZ_TEST_TIMEOUT = 14400
TEST_TIMEOUT = 30
WARMUP_TIMEOUT = 30
BAD_BUILD_CHECK = False
Expand Down
2 changes: 2 additions & 0 deletions src/python/bot/fuzzers/afl/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

CLOSE_FD_MASK_ENV_VAR = 'AFL_DRIVER_CLOSE_FD_MASK'

EXPAND_HAVOC_NOW_VAR = 'AFL_EXPAND_HAVOC_NOW'

MAX_FILE_BYTES = 2**20 # 1 MB

# This should be as high as possible, otherwise AFL will restart the binary too
Expand Down
1 change: 1 addition & 0 deletions src/python/bot/fuzzers/afl/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ def set_environment_variables(self):
environment.set_value(constants.SKIP_CRASHES_ENV_VAR, 1)
environment.set_value(constants.SKIP_CPUFREQ_ENV_VAR, 1)
environment.set_value(constants.BENCH_UNTIL_CRASH_ENV_VAR, 1)
environment.set_value(constants.EXPAND_HAVOC_NOW_VAR, 1)
environment.set_value(constants.STDERR_FILENAME_ENV_VAR,
self.stderr_file_path)

Expand Down

0 comments on commit ab77a57

Please sign in to comment.