Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Persistent Record for libafl-fuzz #2411

Merged
merged 3 commits into from
Jul 16, 2024

Conversation

R9295
Copy link
Collaborator

@R9295 R9295 commented Jul 16, 2024

CI should work now too!

use libafl_bolts::{Error, Named};
use serde::{Deserialize, Serialize};

/// A [`PersitentRecordFeedback`] tracks the last N inputs that the fuzzer has run.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thoguth, I don't think the last N always makes sense / you'd want all since restart (which, sadly, may be target dependent)

Copy link
Collaborator Author

@R9295 R9295 Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@domenukk AFL++ does this based on a provided value. I think it's fine.

@domenukk
Copy link
Member

If we put this into the state, we can actually use this for InProcess fuzzing, too!
Wait, it doesn't need to be in the state since we don't need inputs prior to restarts, right?

Anyway, we definitely want this in the main lib, too! :)

@domenukk
Copy link
Member

domenukk commented Jul 16, 2024

CI is unhappy:

thread 'main' panicked at src/main.rs:99:21:
Failed to run launcher: KeyNotFound("libafl::schedulers::minimizer::TopRatedsMetadata not found",    0: libafl_bolts::Error::key_not_found
             at /home/runner/work/LibAFL/LibAFL/libafl_bolts/src/lib.rs:350:40
...
      <libafl::schedulers::testcase_score::CorpusWeightTestcaseScore<S> as libafl::schedulers::testcase_score::TestcaseScore<S>>::compute
             at /home/runner/work/LibAFL/LibAFL/libafl/src/schedulers/testcase_score.rs:324:28
      libafl::schedulers::weighted::WeightedScheduler<C,F,O,S>::create_alias_table
             at /home/runner/work/LibAFL/LibAFL/libafl/src/schedulers/weighted.rs:174:26
...

@domenukk
Copy link
Member

Oh wait that's in main lol

@domenukk
Copy link
Member

It's so simple, really cool!
We should totally move this to the main lib though.

@domenukk domenukk merged commit b9da7dd into AFLplusplus:main Jul 16, 2024
85 of 98 checks passed
@R9295
Copy link
Collaborator Author

R9295 commented Jul 17, 2024

Regarding the inputs prior to restarts, I'll have to verify.

@domenukk
Copy link
Member

I think it's fine, we don't care about inputs before restarts. The idea is to have a (semi-perfect) rerun of all inputs from the last restart to the crash.
For InProcess it would be good to have an option not to pop any inputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants