Merge pull request #526 from h1994st/dev

Prevent afl-fuzz from modifying stage_max during fuzzing
This commit is contained in:
van Hauser 2020-08-27 08:56:08 +02:00 committed by GitHub
commit b44620f0b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1767,20 +1767,24 @@ custom_mutator_stage:
}
/* If we're finding new stuff, let's run for a bit longer, limits
permitting. */
if (!el->afl_custom_fuzz_count) {
if (afl->queued_paths != havoc_queued) {
/* If we're finding new stuff, let's run for a bit longer, limits
permitting. */
if (perf_score <= afl->havoc_max_mult * 100) {
if (afl->queued_paths != havoc_queued) {
afl->stage_max *= 2;
perf_score *= 2;
if (perf_score <= afl->havoc_max_mult * 100) {
afl->stage_max *= 2;
perf_score *= 2;
}
havoc_queued = afl->queued_paths;
}
havoc_queued = afl->queued_paths;
}
}