Repository navigation
fix(security): bound MRoPE temporal positions to prevent engine crash - #47407
Open
jperezdealgaba wants to merge 1 commit into
Open
jperezdealgaba wants to merge 1 commit into
jperezdealgaba wants to merge 1 commit into
Conversation
jperezdealgaba
force-pushed
the
fix/mrope-position-bounds-check
branch
from
July 2, 2026 08:03
0c543ed to
e1f9a51
Compare
An unbounded temporal multiplier (t_factor) in MRoPE position calculation could produce position indices exceeding the cos_sin_cache size, causing an out-of-bounds index that fatally crashes the EngineCore process via a single unauthenticated request. Defense-in-depth fix: - Add _validate_positions() bounds check in MRotaryEmbedding that raises ValueError for both negative and out-of-bounds positions instead of allowing CUDA illegal memory access - Clamp grid_indices[0] * t_factor to max_position_embeddings * 4 - 1 in get_mrope_input_positions across all affected models - Validate second_per_grid_ts is finite (reject NaN/inf) and floor to 1e-3 to reject near-zero fps values from HF processor output Affected models: Qwen2-VL, Qwen2.5-VL, PaddleOCR-VL, Qwen2.5-Omni-Thinker, Qwen3-Omni-MoE-Thinker. Signed-off-by: Juan Perez de Algaba <jperezde@redhat.com> Signed-off-by: jperezde <jperezde@redhat.com>
jperezdealgaba
force-pushed
the
fix/mrope-position-bounds-check
branch
from
July 2, 2026 08:26
e1f9a51 to
e282536
Compare
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
This branch has not been deployed
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.
An unbounded temporal multiplier (t_factor) in MRoPE position calculation could produce position indices exceeding the cos_sin_cache size, causing an out-of-bounds index that fatally crashes the EngineCore process via a single unauthenticated request. Defense-in-depth fix: