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

libafl-fuzz: separate frida build + cmplog debug #2591

Merged
merged 77 commits into from
Oct 28, 2024

Conversation

R9295
Copy link
Collaborator

@R9295 R9295 commented Oct 8, 2024

Try to fix the cmplog issue in this pr too

@R9295 R9295 changed the title libafl-fuzz: separate frida build libafl-fuzz: separate frida build + cmplog debug Oct 8, 2024
@tokatoka
Copy link
Member

tokatoka commented Oct 8, 2024

https://github.com/mxschmitt/action-tmate

use this if you want to connect to their vm

R9295 added 2 commits October 8, 2024 14:33
move time_tracker stage to LibAFL
@R9295
Copy link
Collaborator Author

R9295 commented Oct 8, 2024

Since AFL++ runs the timeout again with double the timeout, to confirm if it is actually a timeout, I'll implement that and check if that fixes the CI

libafl/src/stages/mod.rs Outdated Show resolved Hide resolved
libafl/src/stages/stats.rs Outdated Show resolved Hide resolved
libafl/src/stages/stats.rs Outdated Show resolved Hide resolved
libafl/src/stages/stats.rs Outdated Show resolved Hide resolved
@tokatoka
Copy link
Member

tokatoka commented Oct 8, 2024

you can delete old afl_stat.rs

…ecutor

libafl-fuzz: add verify_timeout stage
@R9295 R9295 marked this pull request as draft October 9, 2024 15:56
@R9295
Copy link
Collaborator Author

R9295 commented Oct 9, 2024

Making this into a draft PR cause still a bit WIP

@R9295 R9295 marked this pull request as ready for review October 11, 2024 10:14
@R9295
Copy link
Collaborator Author

R9295 commented Oct 11, 2024

set_timeout and timeout should be #[inline]

@domenukk domenukk marked this pull request as draft October 23, 2024 11:15
@R9295 R9295 marked this pull request as ready for review October 24, 2024 14:13
}
}

impl<E, EM, Z, S> Stage<E, EM, Z> for VerifyTimeoutsStage<E, S>
Copy link
Member

Choose a reason for hiding this comment

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

This can go in the main lib as well, right? Or is it forkserver specific?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@domenukk executors must implement HasTimeout for this and currently, not many have. But we can move it to the main lib

) -> Result<(), Error> {
let mut timeouts = state
.metadata_or_insert_with(TimeoutsToVerify::<<S::Corpus as Corpus>::Input>::new)
.clone();
Copy link
Member

Choose a reason for hiding this comment

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

Why clone all inputs here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@domenukk fuzzer.evaluate_input wants an owned input and not a reference

Copy link
Member

Choose a reason for hiding this comment

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

Aah, sad.
Anyway, the loop below will only work for forkserver, never for inprocess, right?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a TODO note for ppl in the future noting this

@domenukk domenukk merged commit 58fad2b into AFLplusplus:main Oct 28, 2024
52 of 99 checks passed
riesentoaster pushed a commit to riesentoaster/LibAFL that referenced this pull request Dec 11, 2024
* libafl-fuzz: separate frida build

* cmplog debug

* update

* merge AflStatsStage
move time_tracker stage to LibAFL

* mandate track_hit_feedbacks feature for AflStatsStage

* afl_stats do not hardcode TimeoutFeedback and CrashFeedback names

* typo

* typo

* fix generics order

* add verify timeouts stage

* libafl: introduce set_timeout func to dynamically set timeouts for executor
libafl-fuzz: add verify_timeout stage

* add missing set_timeout implementations

* libafl-fuzz: move set_timeout and timeout from Executor to HasTimeout

* libafl-fuzz: add removed gitignore

* remove timeout from libafl_nyx::Executor and move it to NyxHelper

* clippy

* fix HasTimeout for QemuExecutor

* libafl-fuzz: remove observer handle usage in verify_timeouts
misc: remove prelude imports

* libafl-fuzz: fix foreign_sync_dirs option

* fmt && clippy

* clippy && fmt

* missing doc

* clippy

* bruh

* damned doc build

* trait fix

* impl HasTimeout for InProcessExecutor only if std

* clippy

* fix typo

* fix nostd build

* clippy

* remove most HasTimeout implementations for now

* typo

* remove redundant import

* misc

* fmt

* simplify trait bounds

* add old AflStatsStage back and rename it to StatsStage

* fix ci

* make set_timeout and timeout of HasTimeout inline

* fmt

* add gitignore

* serde_any fix

* tmate

* misc

* remove tmate

* test

* coordinate between capture_timeout and verify_timeout

* makefile

* fix

* fix

* fmt

* increase cmplog timeout

* semantic

* debug

* debug

* remove dbeug

* only test libafl-fuzz on CI for now

* better seed for cmplog?

* remove preflight check for now

* set Input type in forkserver

* debug

* tmate

* fix capture_timeout

* revert workflow

* run only libafl-fuzz

* remove pre-flight

* re-enable fuzzers on CI

* move capture_timeouts and verify_timeouts to main lib

* run fmt

* add note for verify timeouts

* add note in verify timeouts stage

* typo

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
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.

3 participants