Skip to content

mesh_protobuf: Add a fuzzer#3756

Open
smalis-msft wants to merge 4 commits into
microsoft:mainfrom
smalis-msft:fuzz-protobuf
Open

mesh_protobuf: Add a fuzzer#3756
smalis-msft wants to merge 4 commits into
microsoft:mainfrom
smalis-msft:fuzz-protobuf

Conversation

@smalis-msft

@smalis-msft smalis-msft commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This found one bug already in our handling of negative number edge cases, a fix is included. I tried to make sure this had as much coverage as it can, hence the large number of different types. I also checked to make sure that this would've caught #2919.

Copilot AI review requested due to automatic review settings June 16, 2026 21:43
@smalis-msft smalis-msft requested a review from a team as a code owner June 16, 2026 21:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new mesh_protobuf fuzz target to exercise decode/round-trip/merge paths across a wide range of protobuf shapes, and includes a fix for incorrect zigzag decoding of some negative-number encodings.

Changes:

  • Fix unzigzag(u64) -> i64 to correctly handle full-range zigzag encodings (including boundary values).
  • Add a dedicated fuzz_mesh_protobuf crate/target to fuzz decode, round-trip, and merge across many representative types.
  • Register the new fuzz crate in the workspace and lockfile.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
support/mesh/mesh_protobuf/src/protobuf.rs Fixes zigzag decode logic for signed varints.
support/mesh/mesh_protobuf/fuzz/fuzz_mesh_protobuf.rs New fuzzer target exercising decode/round-trip/merge across many encodings/types.
support/mesh/mesh_protobuf/fuzz/Cargo.toml Adds fuzz crate manifest/config and OneFuzz allowlist.
Cargo.toml Adds the new fuzz crate to workspace members.
Cargo.lock Adds lock entry for the new fuzz crate.

Comment thread support/mesh/mesh_protobuf/fuzz/fuzz_mesh_protobuf.rs
Comment thread support/mesh/mesh_protobuf/src/protobuf.rs
Copilot AI review requested due to automatic review settings June 16, 2026 22:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Comment thread support/mesh/mesh_protobuf/fuzz/fuzz_mesh_protobuf.rs
Comment thread support/mesh/mesh_protobuf/fuzz/fuzz_mesh_protobuf.rs
@github-actions

Copy link
Copy Markdown

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