Md Aeinul Islam - adaptive coverage - #4
Open
md-islam wants to merge 8 commits into
Open
Conversation
Specify FUZZ_PCT=[0,100] in configrc before running run.sh. You may check whether it works by looking at the buildlog's docker run command, whether there is an -env=FUZZ_PCT= See #3 Co-authored-by: zlzcty <zlzcty@me.com>
Add fields to afl_state_t structure to support adaptive coverage: - adaptive_mode: flag to enable/disable adaptive mode - last_new_path_time: timestamp of last new path discovery - time_since_new_path: calculated elapsed time - adaptive_cov_pct: current coverage percentage These variables will enable dynamic coverage adjustment based on fuzzing progress, inspired by Angora's selective instrumentation principle but using a temporal signal instead of per-execution detection.
Add adjust_adaptive_coverage() function implementing three-tier algorithm: - Tracks time since last new path discovery - Adjusts coverage: 100% (hot) → 50% (warm) → 25% (cold) - Integrates with Marco's feedback_use_pct infrastructure Add -A command-line flag to enable adaptive mode: - Initializes adaptive state variables - Sets starting coverage to 100% - Displays confirmation message Add help text documenting -A flag usage. Temporal adaptation inspired by Angora's selective instrumentation principle but implemented in single binary for simpler deployment.
Update last_new_path_time when add_to_queue() is called. This resets the adaptive timer, causing coverage to return to 100% when fuzzer makes progress. Integration point follows Angora's pattern of detecting coverage- increasing executions, but uses timestamp tracking instead of dual-binary oracle/tracer approach for simpler implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
⏺ Adaptive coverage is a dynamic fuzzing strategy that automatically adjusts how much code coverage instrumentation
is used based on whether the fuzzer is actually finding new paths.
The core idea:
How it works:
- < 5 minutes since new path → 100% coverage (HOT phase)
- 5-30 minutes since new path → 50% coverage (WARM phase)
- > 30 minutes since new path → 25% coverage (COLD phase)
Why this matters:
Key advantage over alternatives:
It's basically saying: "Use expensive coverage when it's working, cheap coverage when you're stuck."
⏺ # Add Adaptive Coverage Mode for AFL++
Summary
Implements adaptive coverage mode - a dynamic coverage adjustment strategy that automatically scales
instrumentation based on fuzzing progress.
Motivation
Coverage overhead remains constant throughout fuzzing campaigns, even when path discovery stagnates. This wastes
resources during late-stage fuzzing when the fuzzer is stuck and not finding new paths.
Problem: Full coverage has ~2x overhead even when discovery has stopped.
Solution: Dynamically adjust coverage based on time since last new path discovery.
Implementation
Algorithm
Coverage adjusts automatically in three tiers based on fuzzing progress:
Key Features
-Fflag infrastructureUsage