Skip to content

[Decode] Bound cumulative AV1 slice parameter counts - #2088

Draft
XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:fix-av1-slice-total
Draft

XinfengZhang wants to merge 1 commit into
intel:masterfrom
XinfengZhang:fix-av1-slice-total

Conversation

@XinfengZhang

Copy link
Copy Markdown
Contributor

Multiple AV1 slice parameter buffers can each fit the per-buffer limit while their combined count exceeds the fixed slice array capacity in the legacy DDI.

Check the remaining capacity in both ParseTileParams and AllocSliceControlBuffer before computing offsets or writing parameters. Oversized totals return VA_STATUS_ERROR_MAX_NUM_EXCEEDED; batches that exactly fill the arrays remain valid.

Validation: extracted source functions with minimal dependency stubs under ASan/UBSan passed 392 boundary cases, repeated buffer submission, rejected-operation state checks, and reset checks. The unpatched functions reproduced heap overflows in tile parsing and a simulated client write through an oversized reservation offset. git diff --check passed. Full driver build and GPU testing were not performed.

Reject tile parameter batches that exceed the remaining capacity of the
fixed AV1 slice arrays in the legacy DDI. Check both parsed tile totals
and reserved slice control totals before computing offsets or writing
parameters. This prevents multiple individually valid buffers from
overflowing the shared arrays.
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