Skip to content

serve: bound the container reader's frames with avkit v0.17.0 - #3

Merged
tannevaled merged 1 commit into
mainfrom
avkit-reader-limits
Nov 14, 2026
Merged

tannevaled merged 1 commit into
mainfrom
avkit-reader-limits

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Refs go-avkit/avkit#89
Refs go-avkit/avkit#120

Second line of defence for laced Matroska blocks: go-avkit/avkit v0.17.0 bounds the frames its reader unpacks.

  • go.mod: go-avkit/avkit v0.16.0 to v0.17.0.
  • open calls container.NewReaderWithLimits with MaxTrackFrames = MaxTrackSamples and MaxFrames = 2 * MaxTrackSamples of the request's clamped limits (a request can only lower them); ErrReaderLimit is answered video.limit.
  • The pre-scan stays the first line.
  • TestReaderRefusesLacedBombWithoutThePrescan calls open directly on a file the pre-scan refuses, and the reader still refuses it.
  • README Security section updated.

🤖 Generated with Claude Code

Bump go-avkit/avkit to v0.17.0 and open files with NewReaderWithLimits, passing
the request's clamped MaxTrackSamples (and twice that for the file); ErrReaderLimit
is video.limit. The pre-scan stays the first line. A test bypasses it and the
reader still refuses.

Refs go-avkit/avkit#89

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 32e792e into main Nov 14, 2026
8 checks passed
@tannevaled
tannevaled deleted the avkit-reader-limits branch November 14, 2026 17:50
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