Skip to content

Bound SA3D channel map parsing - #2

Open
acts-1631 wants to merge 1 commit into
VarolOkan:masterfrom
acts-1631:security-fix-sa3d-bounds
Open

Bound SA3D channel map parsing#2
acts-1631 wants to merge 1 commit into
VarolOkan:masterfrom
acts-1631:security-fix-sa3d-bounds

Conversation

@acts-1631

Copy link
Copy Markdown

The parser used by Shotcut can trust an oversized SA3D channel count and grow the channel map without regard to the box payload, causing excessive memory use.

This patch validates the minimum SA3D payload, checks box bounds without overflow, accounts for extended box headers, and requires the channel map to fit before reading entries. It also limits the type comparison to the four-byte box name.

Verification:

  • A malformed SA3D box declaring 0xffffffff channels was rejected safely.
  • A valid one-channel SA3D box parsed successfully.
  • Short and extended-size SA3D boxes were handled safely.

Validate SA3D box sizes and channel counts before reading channel map

entries. This prevents malformed media from causing unbounded vector

growth and keeps extended box headers and position bounds consistent.
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