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

Fuzz Testing: Clarity value sanitization and serialization #3780

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

kantai
Copy link
Member

@kantai kantai commented Jul 6, 2023

Description

This PR adds a cargo fuzz target that instruments and makes some assertions about the 2.4-enabled clarity value sanitization as well as existing serialization and deserialization routines.

Unlike previous fuzzing PRs, this one does not need to make any changes in the clarity module: implementation of Arbitrary is done in the fuzzing module itself.

Additional info (benefits, drawbacks, caveats)

This PR (apart from a warn -> debug log downgrade) does not make any changes to the codebase, it just adds new testing coverage. This could also be used a starting point for future fuzz testing (see discussion #3732)

@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #3780 (5758e9b) into develop (b820596) will not change coverage.
Report is 1 commits behind head on develop.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##           develop    #3780   +/-   ##
========================================
  Coverage     0.18%    0.18%           
========================================
  Files          306      306           
  Lines       280746   280746           
========================================
  Hits           512      512           
  Misses      280234   280234           
Files Changed Coverage Δ
clarity/src/vm/types/serialization.rs 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

clarity/fuzz/Cargo.toml Outdated Show resolved Hide resolved
@kantai kantai force-pushed the test/sanitize-fuzzing branch 2 times, most recently from c08ccaa to 695ff36 Compare July 28, 2023 18:00
@jcnelson jcnelson self-requested a review August 3, 2023 15:02
Copy link
Member

@jcnelson jcnelson left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my feedback!

Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

@kantai kantai merged commit 2e756fe into develop Aug 3, 2023
1 check passed
@kantai kantai deleted the test/sanitize-fuzzing branch August 3, 2023 19:41
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants