Skip to content

Parallel targets support#680

Open
ttufts wants to merge 2 commits intojtpereyda:masterfrom
ttufts:parallel_targets_support
Open

Parallel targets support#680
ttufts wants to merge 2 commits intojtpereyda:masterfrom
ttufts:parallel_targets_support

Conversation

@ttufts
Copy link
Copy Markdown

@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 ttufts force-pushed the parallel_targets_support branch from 1aed8b3 to 2988c85 Compare August 21, 2023 19:59
@ttufts
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants