Skip to content

fuzz: rework structural fuzzing to have explicit limits#889

Merged
V0ldek merged 2 commits into
mainfrom
v0ldek/structured-fuzzing-fixes
Feb 3, 2026
Merged

fuzz: rework structural fuzzing to have explicit limits#889
V0ldek merged 2 commits into
mainfrom
v0ldek/structured-fuzzing-fixes

Conversation

@V0ldek

@V0ldek V0ldek commented Feb 2, 2026

Copy link
Copy Markdown
Member

Short description

Following advice from rust-fuzz (rust-fuzz/libfuzzer#138) I reworked the Arbitrary implementations used by the fuzzer to have explicit caps on size and recursion depth.

Arbitrary JSONPath queries have a limit on max number of segments and selectors per segment, as well as a recursion limit for filter expressions and a more restrictive one specifically for recursive queries within filter expressions.

The arbitrary JSON generator has a limit on the overall number of nodes.

The arbitrary feature is removed from rsonpath-syntax and the impls are now in the library target of the fuzzer.

On my machine I can run all fuzzers for an hour without exceeding the 2560 rss limit. Hopefully, this will resolve our fuzzing oom issues.

Issue

Resolves: #749

Checklist

All of these should be ticked off before you submit the PR.

  • I ran just verify locally and it succeeded.
  • Issue was given go ahead and is linked above OR I have included justification for a minor change.
  • Unit tests for my changes are included OR no functionality was changed.

Following advice from rust-fuzz
(rust-fuzz/libfuzzer#138)
I reworked the `Arbitrary` implementations used by the fuzzer
to have explicit caps on size and recursion depth.

Arbitrary JSONPath queries have a limit on max number of segments
and selectors per segment, as well as a recursion limit for filter
expressions and a more restrictive one specifically for
recursive queries within filter expressions.

The arbitrary JSON generator has a limit on the overall number
of nodes.

The `arbitrary` feature is removed from `rsonpath-syntax`
and the impls are now in the library target of the fuzzer.

On my machine I can run all fuzzers for an hour without exceeding
the 2560 rss limit. Hopefully, this will resolve our fuzzing oom
issues.
@V0ldek V0ldek merged commit fb3164a into main Feb 3, 2026
56 of 73 checks passed
@V0ldek V0ldek deleted the v0ldek/structured-fuzzing-fixes branch February 3, 2026 10:32
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.

ClusterFuzzLite Batch Fuzzing Failure Tuesday, July 22nd 2025

1 participant