Skip to content

gltfpack: Improve fuzzing infrastructure - #1067

Merged
zeux merged 5 commits into
masterfrom
gltf-fuzz
Jul 14, 2026
Merged

gltfpack: Improve fuzzing infrastructure#1067
zeux merged 5 commits into
masterfrom
gltf-fuzz

Conversation

@zeux

@zeux zeux commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Instead of treating the binary as an opaque blob, we now mutate JSON or
BIN chunk explicitly during fuzzing. This is much better for fuzzing
efficiency, because it allows expanding or contracting either chunk and
automatically fixes up lengths, which previously one-shot mutating could
not do.

Also update fuzzing dictionary with new extensions and fix a few small
interactions.

zeux added 5 commits July 13, 2026 13:02
We were missing a host of newly added extensions; also fix a broken
quote in emissiveStrength.
Instead of treating the binary as an opaque blob, we now mutate JSON or
BIN chunk explicitly during fuzzing. This is much better for fuzzing
efficiency, because it allows expanding or contracting either chunk and
automatically fixes up lengths, which previously one-shot mutating could
not do.

For now we still use the "only keep valid files in the corpus" heuristic
and with this change it gets us much further, although it does still
mean that the fuzzer can't really make coordinated changes across both
JSON/BIN, which means it can't always get to a valid-but-problematic
document through a sequence of edits.
Many algorithms during gltfpack processing need positions; we currently
have early outs for all of them, but this is a bit fragile.

Because position-less meshes should be skipped per specification anyway,
we discard primitives like that early.
We need to pass a non-NULL pointer for the meshopt extension to avoid
strcmp with NULL.
This completes the full set of names that cgltf.h recognizes, so that
it's easier for the fuzzer to synthesize interesting documents.
@zeux
zeux merged commit f843aae into master Jul 14, 2026
13 checks passed
@zeux
zeux deleted the gltf-fuzz branch July 14, 2026 19:51
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.

1 participant