[Security] Bound Dots3 NOTE video audio decode duration and bytes - #56304
Open
jperezdealgaba wants to merge 1 commit into
Open
jperezdealgaba wants to merge 1 commit into
jperezdealgaba wants to merge 1 commit into
Conversation
Co-authored-by: Cursor Agent Signed-off-by: Juan Pérez de Algaba <jperezde@redhat.com>
jperezdealgaba
requested review from
AndreasKaratzas,
DarkLight1337 and
ywang96
as code owners
September 10, 2026 15:29
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.
Summary
The Dots3 NOTE video preprocessor decoded a request-supplied video's audio track with an unbounded
get_all_samples()call, so a small container with a long audio stream could expand into gigabytes of PCM during multimodal preprocessing. This routes that path through the shared torchcodec audio loader, which already enforces the server duration and decoded-byte limits.Changes
vllm/models/dots3_note/common/video.py: decode video audio viaload_audio_torchcodecwithVLLM_MAX_AUDIO_DECODE_DURATION_SandVLLM_MAX_AUDIO_DECODE_BYTES. Duration and byte-limit errors fail the request; missing or corrupt audio tracks still skip audio.tests/models/dots3_note/test_video_audio_decode.py: unit coverage for forwarded limits, over-duration and over-bytes rejection, missing-audio skip, preprocess propagation, andaudio_cap=0not decoding.Codepath coverage
/v1/chat/completions, batch,/invocations, gRPC generate,LLM.generate) go through_decode_audio. That sink is now bounded.input_audio/audio_urlstill useAudioMediaIO, which already passes the same limits.use_audio_in_videoin chat parsing fetches audio throughMediaConnector/AudioMediaIOand is unchanged.Duplicate-work check
Searched open, draft, and recently merged PRs for
dots3_note,_decode_audio,get_all_samples, andload_audio_torchcodec. Hits such as #53610 (processor refactor), #51894 (channel-count guard on the shared loader), and #56056 (PyAV packed-frame conversion) do not bound this sink.Tests
test_decode_audio_forwards_duration_and_byte_limitstest_decode_audio_rejects_over_durationtest_decode_audio_rejects_over_decode_bytestest_decode_audio_skips_missing_audio_tracktest_preprocess_rejects_over_duration_audiotest_preprocess_skips_audio_decode_when_audio_cap_is_zero6 passed.
.venv/bin/pre-commit run --files vllm/models/dots3_note/common/video.py tests/models/dots3_note/test_video_audio_decode.pypassed.AI assistance
This PR was developed with AI assistance.
Made with Cursor