Skip to content

fix(net): the ingest fuzzer counts a refused GROUP_END as a failed stream - #9216

Merged
kixelated merged 2 commits into
mainfrom
quest/m0/nightly/fuzz-ingest-bound
Nov 20, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m0/nightly/fuzz-ingest-bound

Conversation

@kixelated

@kixelated kixelated commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Fuzz (ingest) failed in Nightly run 44562804083:

0 frames of 0 bytes account for at most 27 of a 101-byte stream

The input is a lite-07 timed stream: one 93-byte frame stamped about 15e9 ms, then GROUP_END with End 0. Ingest reads both and returns Ok(Some(0)). Then recv::Group::end(Some(0)) refuses an end before a frame the group holds and aborts the group with MalformedTrack, which is what the session does with that stream (lite/subscriber.rs, Ok(end) => group.end(end)). Ingest is correct. The bug is in the harness: run discarded the result of group.end(fin), recorded the end as clean, and then read zero frames from the aborted group. The size bound then fired on the mismatch.

Changes

  • rs/moq-net/src/fuzz/ingest.rs: a refused end now becomes the run's error, so the harness sees the stream fail as the session does.
  • The crash input joins fuzz/regressions/ingest/ as lite07-group-end-before-frame.
  • Deletes quest/m0/nightly/fuzz-ingest-bound.md.

Impact

Public API: none. Wire: none. Test harness only.

Decisions

Choices I made without the maintainer (all undoable in review):

  • I fixed the harness instead of making ingest reject a GROUP_END before a held frame. recv::Group already enforces that check for the session and for this harness, so a second copy in ingest would duplicate it.
  • I gave the regression input a descriptive name instead of its crash-<hash> name, following draft22-untimed-extension-block.

Validation

  • The crash input reproduced the panic through fuzz::tests::regressions before the fix (ingest.rs:191, the same message as Nightly) and passes after it. cargo test -p moq-net --features fuzz --lib fuzz:: passes 6/6.
  • Real surface: just rs fuzz ingest -- -max_total_time=300 -timeout=10 on nightly 1.102 with cargo-fuzz 0.13.2, corpus seeded with the committed regressions including this input. Done 477,595 runs in 301 s, no crash.
  • just check passes.

Caused by

  • moq-dev/moq#8908 - replaced the harness's infallible group.finish() with the fallible group.end(fin) but kept discarding its result (found by check: the Nightly fuzzer)

Follow-ups

None.

Models

Size: S
Implementer: Claude, claude-opus-5-5, medium effort

(Written by Claude Opus 5.5 with medium)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: d20a736

  • Base: origin/main at 1a34abe

  • Risk: low, Only the ingest fuzz harness, a regression input, and a quest plan change, so no consumer or peer behavior can break, and a revert fully undoes the change.

  • Classified: low by Codex, gpt-6.1-sol, low effort, session 01a1f6f8-f5c7-7821-ab95-c591a7e2f616

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1f6f9-0be5-7b32-8533-41835251cb0f, round 1

  • Score: 10/10, The focused change fixes false clean-end classification by propagating group-finalization errors and adds the crash input to regression replay; source review found no issues, though tests were not run.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 19, 2026 18:56
…ream

The harness dropped the result of settling the group, so a GROUP_END before
a frame it held read as a clean end over an aborted, empty group, tripping
the stream-size bound. The session already fails that stream with
MalformedTrack; the harness now does too. The crash input joins the
regressions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title The ingest fuzzer's stream-size bound holds fix(net): the ingest fuzzer counts a refused GROUP_END as a failed stream Nov 20, 2026
@kixelated
kixelated marked this pull request as ready for review November 20, 2026 03:22

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Approach: sound. The harness now treats a group.end(fin) the group refuses as the run's error, as the session does, instead of fixing the ingest path that was already correct.

Reviewed changes

Reviewed the full diff: the harness fix, the regression input and the quest file deletion.

  • rs/moq-net/src/fuzz/ingest.rs: run now keeps the result of group.end(fin), so a refused end is reported as Err and no longer recorded as a clean end. The Err arm still aborts the group and returns the original error. The types line up with the later end.map_err(|err| err.to_string()).
  • rs/moq-net/fuzz/regressions/ingest/lite07-group-end-before-frame: adds the crash input, which just check replays via fuzz::tests::regressions. The diff shows this file as binary, so I did not inspect its bytes.
  • quest/m0/nightly/fuzz-ingest-bound.md: removes the finished quest plan.

I did not run the tests. The PR reports fuzz:: passing 6/6 and a 300 s just rs fuzz ingest run with no crash.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The ingest fuzzer now uses the group settlement result as its result when ingest succeeds. If ingest fails, it still aborts the group and returns the ingest error. The document describing the crash investigation and planned regression-corpus update was deleted.

Merge Risk: Minimal · up to d20a7

This change only affects the ingest fuzz harness: a refused group end is now reported as an error instead of being treated as a clean stream end. It has no public API or wire impact, and merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the actual change: the ingest fuzzer treated a refused GROUP_END as a failed stream. The title matches the harness fix in rs/moq-net/src/fuzz/ingest.rs, where run now propagates the gr…
Description check Passed The description explains the Nightly failure, the root cause (the harness discarded the group.end result), the changes to ingest.rs, the regression input, the deleted quest document, validation steps,…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the actual change: the ingest fuzzer treated a refused GROUP_END as a failed stream. The title matches the harness fix in rs/moq-net/src/fuzz/ingest.rs, where run now propagates the group.end(fin) result instead of discarding it.

Full details: Description check

Explanation

The description explains the Nightly failure, the root cause (the harness discarded the group.end result), the changes to ingest.rs, the regression input, the deleted quest document, validation steps, and the commit that introduced the bug. It matches the changeset closely.

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 965b6e76-7f47-4d34-9d69-a7224dd2c5fa
Commits

Reviewing files that changed from the base of the PR and between b3de94d and d20a736.

Files selected for processing: 3

  • quest/m0/nightly/fuzz-ingest-bound.md
  • rs/moq-net/fuzz/regressions/ingest/lite07-group-end-before-frame
  • rs/moq-net/src/fuzz/ingest.rs
Files with no reviewable changes: 1

  • quest/m0/nightly/fuzz-ingest-bound.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge pick (maintainer away, granted the coordinator merges it confidently recommends): ✅ /quest-merge at d20a736.

(Written by Claude Opus 5.5 with high)

@kixelated
kixelated added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 611af8b Nov 20, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m0/nightly/fuzz-ingest-bound branch November 20, 2026 04:00
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