Skip to content

UnicornAFL v3 integration #2468

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

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

UnicornAFL v3 integration #2468

wants to merge 1 commit into from

Conversation

wtdcode
Copy link
Member

@wtdcode wtdcode commented Jun 11, 2025

This PR enables integration with UnicornAFL mode by enabling cmplog.

I finally decided to keep Unicorn mode instead of reusing QEMU mode as previously proposed because the harness of UnicornAFL is still slightly different from QEMU harness.

For UnicornAFL C/CPP/RUST bindings harness, -U is not necessary, but enabling that is also harmless since it essentially skips the binary check.

For UnicornAFL Python bindings harness, -U is compulsory to make it work. This is because the argv[0] is python instead of the real harness.

I will further update samples and scripts under unicorn_mode

@@ -146,6 +146,8 @@ typedef struct afl_forkserver {
bool use_fauxsrv; /* Fauxsrv for non-forking targets? */

bool qemu_mode; /* if running in qemu mode or not */

bool unicorn_mode; /* if running in unicorn mode or not*/
Copy link
Member

Choose a reason for hiding this comment

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

Can we get around this extra flag? Ideally merge it with existing flags of the same meaning

Copy link
Member

Choose a reason for hiding this comment

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

other modes have their own flag too - so why not?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

other modes have their own flag too - so why not?

The other modes should also not have extra flags, it should be a flag for feature xyz IMHO

Copy link
Contributor

Choose a reason for hiding this comment

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

My previous PR (#2419) contains some codes that remove this unnecessary variable. Maybe you could sync some codes from there :)

Copy link
Member

Choose a reason for hiding this comment

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

other modes have their own flag too - so why not?

The other modes should also not have extra flags, it should be a flag for feature xyz IMHO

then it is on us to refactor that for all of them, not in this PR - IMHO

Copy link
Member

Choose a reason for hiding this comment

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

Fair

@vanhauser-thc
Copy link
Member

any idea when unicornv3 will land?
I will release a new version of AFL++ very soon, should this be in it or rather in the next release?

@wtdcode
Copy link
Member Author

wtdcode commented Jun 21, 2025

On academic travel so no eta unfortunately =/

Next release is probably better.

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.

4 participants