Repository navigation
spark-model: refuse a video frame count its payload cannot hold - #295
Merged
AzeezIsh merged 1 commit intoOct 31, 2026
Merged
Conversation
probe_frames took nb_frames, or duration × rate, with no upper bound, and glm_sample_frame_indices grows one usize per sampled step of that count before extract_t applies. Patching one stts entry in a 1,848-byte MP4 made ffprobe 7.1.1 report 4,000,000,000 frames, a walk of about 13 GB. Every stored frame takes at least a byte, so refuse a count above the payload size. An honest clip is unaffected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 31, 2026
vcruz305
pushed a commit
to vcruz305/atlas
that referenced
this pull request
Nov 11, 2026
…-Inf#256) Port of Atlas-Inf#256 (Enntity/atlas f3f3876 via 5497364, plus 8a8a959 from Atlas-Inf#295) onto main's Atlas-Inf#286 video path. Atlas-Inf#256's stack base already landed through Atlas-Inf#282, and the DFlash warm-ctx port from the same stack (Atlas-Inf#255) is not included. Every video file here is byte-identical to the version gated in train Atlas-Inf#305. - ensure_decoder is the single source for the ffmpeg enabled/available check, in video_decode_ffmpeg/probe.rs (pub(super)); decode_with_plan and frames.rs call it. - The moov/faststart decode tests use the enabled() policy; on a host with ffmpeg they fail on main under FfmpegPolicy::default(). - The GLM reference path pads a single sampled frame into a temporal pair. Qwen's generic path is unchanged. - The generic-path GLM single-frame refusal test is dropped, superseded by the reference pad test (the generic GLM branches are now unreachable behind the is_glm5_next early return; follow-up). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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
probe_framestooknb_frames, or duration × rate, with no upper bound, andglm_sample_frame_indicesgrows oneusizeper sampled step of that count beforeextract_tapplies. Every stored frame takes at least a byte, so this refuses a count above the payload size. An honest clip is unaffected.Targets
stack/glm-videobecause the walk exists only in #256, not on main.Test plan
cargo fmt --all -- --checkcargo clippy --no-depson the changed code, no warnings. A full run stops on theatlas_glm_kdacfg error already on this stack.bash scripts/check-license-headers.sh: not run, no new files.declared_frames_reads_nb_frames_then_duration_times_rateanda_frame_count_the_payload_cannot_hold_is_refused.Patching one
sttsentry in a 1,848-byte MP4 made ffprobe 7.1.1 report 4,000,000,000 frames. That is about 13 GB of walk by arithmetic; I did not run the allocation. The refusal itself is unit-tested only, not end to end through ffprobe, because the gates container has no ffmpeg.Notes for reviewers
The bound is deliberately loose: one byte per frame stops the allocation without guessing at real codec sizes.
This is security-relevant and
SECURITY.mdasks for private reports. The commit was already public onEnntity/atlaswhen that was noticed, so this comes as a normal PR.Authorship
AI-authored (Claude Code). No human-written code.
🤖 Generated with Claude Code