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

Parallel targets support #680

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ttufts
Copy link

@ttufts ttufts commented Aug 21, 2023

Finished implementing parallel target support, removed hardcoded target index 0 and added iterator cycling so that mutations are load leveled over all targets that are added.

@ttufts
Copy link
Author

ttufts commented Aug 21, 2023

Ran unit tests, all related tests pass, failing on test_monitors.py but that doesn't seem to be related. Might be running something wrongly.

Copy link
Collaborator

@SR4ven SR4ven left a comment

Choose a reason for hiding this comment

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

Sorry for the late review and thanks for the PR @ttufts!

I just tested the change with two targets and it seems that the test are now being sent to the targets in an alternating way.
Case 1 -> Target 1
Case 2 -> Target 2
Case 3 -> Target 1
Case 4 -> Target 2

When it should be like this:
Case 1 -> Target 1
Case 1 -> Target 2
Case 2 -> Target 1
Case 2 -> Target 2

We should also add some kind of info about the current target to the logging, so that it's clear which target is currently in use.

Additionally, we should give the constructor of Session an option for multiple targets in form of a list.
Also, I noticed, that calling Session.add_target() will not execute the following code that is currently only present in the constructor.

boofuzz/boofuzz/sessions.py

Lines 578 to 591 in 12ec28c

if target is not None:
def apply_options(monitor):
monitor.set_options(crash_filename=self._crash_filename)
return
target.monitor_alive.append(apply_options)
try:
self.add_target(target)
except exception.BoofuzzRpcError as e:
self._fuzz_data_logger.log_error(str(e))
raise

So monitors are not equally set up with both methods.

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.

None yet

2 participants