Skip to content

fix(security): restore incremental marker search cursors in thinking budget state - #51133

Open
jperezdealgaba wants to merge 1 commit into
vllm-project:mainfrom
jperezdealgaba:fix/ghsa-497v-rww5-557q-quadratic-scan
Open

jperezdealgaba wants to merge 1 commit into
vllm-project:mainfrom
jperezdealgaba:fix/ghsa-497v-rww5-557q-quadratic-scan

Conversation

@jperezdealgaba

Copy link
Copy Markdown
Collaborator

The thinking_token_budget state machine re-scans the entire output history on every decode step when markers are absent, resulting in O(L^2) total work. An unauthenticated client can exploit this via valid API parameters to degrade latency for co-tenant requests.

Restore independent per-marker search cursors that advance past already-searched tokens, bounding per-step work to O(delta) and total work to O(L).

…budget state

The thinking_token_budget state machine re-scans the entire output
history on every decode step when markers are absent, resulting in
O(L^2) total work. An unauthenticated client can exploit this via
valid API parameters to degrade latency for co-tenant requests.

Restore independent per-marker search cursors that advance past
already-searched tokens, bounding per-step work to O(delta) and
total work to O(L).

Signed-off-by: Jose Perez <jperezde@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

Signed-off-by: jperezde <jperezde@redhat.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mrv1-only Issues/PRs which apply only to Model Runner V1 (not applicable to Model Runner V2)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants