Skip to content

Conversation

@rzikm
Copy link
Member

@rzikm rzikm commented Oct 23, 2025

This PR introduces corpus support for the DotnetFuzzing project. Currently this works for local runs only (OneFuzz requires creating a special container for corpus, which probably needs to be done manually -- once per fuzzer, this is left for future work).

Currently, some fuzzers (IMO incorrectly) use dictionaries as a replacement for lack of corpus support, which makes fuzzing inefficient. This PR prepares ground for future improvements in this regard.

To validate the concept, this PR converts ZipArchive fuzzing to use corpus instead of a dictionary, and adds code to fuzz Deflate64 (for which we have managed implementation internal to reading ZipArchives).

@rzikm rzikm marked this pull request as ready for review October 23, 2025 13:57
Copilot AI review requested due to automatic review settings October 23, 2025 13:57
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 23, 2025
@rzikm
Copy link
Member Author

rzikm commented Oct 23, 2025

cc @MihaZupan

Copy link
Contributor

Copilot AI left a comment

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 corpus support to the DotnetFuzzing project for local runs, allowing fuzzers to use seed corpora instead of relying on dictionaries. The change improves fuzzing efficiency by providing proper initial test cases. The ZipArchiveFuzzer is updated to use a corpus, and a new Deflate64Fuzzer is introduced to test the managed Deflate64 decompression implementation.

  • Adds corpus infrastructure to the fuzzing framework with validation and deployment logic
  • Converts ZipArchiveFuzzer to use corpus instead of dictionary for better fuzzing effectiveness
  • Introduces Deflate64Fuzzer to test internal Deflate64 decompression used in ZipArchive reading

Reviewed Changes

Copilot reviewed 6 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/libraries/Fuzzing/DotnetFuzzing/Program.cs Adds corpus directory handling, validation, and deployment logic for both OneFuzz and local runs
src/libraries/Fuzzing/DotnetFuzzing/IFuzzer.cs Extends IFuzzer interface with optional Corpus property
src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/ZipArchiveFuzzer.cs Adds corpus property to use seed files instead of dictionary
src/libraries/Fuzzing/DotnetFuzzing/Fuzzers/Deflate64Fuzzer.cs New fuzzer for testing Deflate64 decompression with reflection-based stream creation
src/libraries/Fuzzing/DotnetFuzzing/DotnetFuzzing.csproj Simplifies fuzzer file inclusion using wildcard and adds corpus files to build output
eng/pipelines/libraries/fuzzing/deploy-to-onefuzz.yml Adds OneFuzz deployment task for new Deflate64Fuzzer

@rzikm rzikm added area-Meta and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 23, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

@rzikm rzikm requested a review from MihaZupan October 23, 2025 14:01
@MihaZupan MihaZupan added this to the 11.0.0 milestone Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants