libafl_targets: fix persistent mode for rust forkserver#3844
Open
friedbyalice wants to merge 11 commits into
Open
libafl_targets: fix persistent mode for rust forkserver#3844friedbyalice wants to merge 11 commits into
friedbyalice wants to merge 11 commits into
Conversation
b0ed585 to
70b8910
Compare
70b8910 to
171d63d
Compare
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.
Description
Forkserver impl inside of
libafl_targetsshould useWUNTRACEDforwaitpidin theForkserverParent, otherwise it will get stuck when a persistent mode child raisesSIGSTOP.I assume persistent mode in the pure rust forkserver impl to be supported because there's already explicit support for persistent mode in it, this just fell through the cracks when looking at https://github.com/AFLplusplus/AFLplusplus/blob/82a149c3a4fcfa08373eb4837a453f8e7e1b0dde/instrumentation/afl-compiler-rt.o.c#L1754-L1755 .
The pr also includes a small test and a simple fuzzer example that checks that a pure rust forkserver impl is possible.
Ready to interactive rebase this to clean it up for review, and I'm appreciate if it was squashed if ever considered for merging.
I also cherry-picked #3841 , waiting for it to get merged.
Checklist
./scripts/precommit.shand addressed all comments