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

fix: consider fuzzing successful if semantic check passes #685

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Tverous
Copy link

@Tverous Tverous commented Nov 1, 2024

Desc

A fuzzing result should be considered successful if the semantic check yields an error type other than SemanticCheckResult.NOT_APPLICABLE or SemanticCheckResult.NO_SEMANTIC_ERR (see fuzz_target_error.py#L163).

Currently, in builder_runner.py#L519, the code incorrectly marks the run as failed when the semantic result has the desired error type, preventing an early stop on successful fuzzing - evaluator.py#L391

Copy link

google-cla bot commented Nov 1, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@DonggeLiu
Copy link
Collaborator

DonggeLiu commented Nov 11, 2024

Thanks @Tverous.

A fuzzing result should be considered successful if the semantic check yields an error type other than SemanticCheckResult.NOT_APPLICABLE or SemanticCheckResult.NO_SEMANTIC_ERR (see fuzz_target_error.py#L163).

IIUC, that function says:
If the error type is neither NOT_APPLICABLE nor NO_SEMANTIC_ERR, then it has_err hence unsuccessful?

Imagine fuzzing ends up with an error with type NO_SEMANTIC_ERR: Function has_err() returns False, and run_result.succeeded is True.
This result makes sense because the error is not caused by semantic bugs (e.g. incorrect implementation in the fuzz target) and is likely caused by a real bug (e.g., vulnerabilities in the project under test). We conclude run_result.succeeded is True so that we don't need to fix the fuzz target and can report the bug to the project maintainer.

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