Add reflection_fuzzer covering the C++ reflection API - #9213
Open
tinhien11 wants to merge 1 commit into
Open
Conversation
The existing targets fuzz the parser, verifier, flexbuffers and the annotator (fixed schema). This adds a target for the reflection API itself, the documented path for consuming an untrusted schema plus untrusted data at runtime: VerifySchemaBuffer(schema) -> Verify(schema, root, data) -> CopyTable Input format: u32 schema_length | bfbs schema | flatbuffer data. Inputs failing either verification step return early, so the corpus converges on pairs that exercise the full consume path. reflection_debug follows the scalar_debug/monster_debug convention.
|
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. |
tinhien11
force-pushed
the
add-reflection-fuzzer
branch
from
September 1, 2026 09:45
4394876 to
35e2fc7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing fuzz targets cover the parser, verifier, flexbuffers and the annotator (with a fixed schema), but not the reflection API itself:
reflection::VerifySchemaBuffer()→flatbuffers::Verify(schema, root, ...)→flatbuffers::CopyTable(), which is the documented path for consuming an untrusted schema together with untrusted data at runtime.This adds
reflection_fuzzerwith a simple two-part input:Inputs that fail either verification step return early, so the corpus converges on schema/data pairs that exercise the full consume path.
reflection_debugfollows the existingscalar_debug/monster_debugconvention for reproducing crash files locally.Verified locally with
-DUSE_ASAN=ON -DBUILD_DEBUGGER=ON. The OSS-Fuzz project build (projects/flatbuffers) builds all targets fromtests/fuzzer, so no oss-fuzz-side change is needed.