Fix IAMF specific box parsing bug in MP4 demuxer#11543
Open
osagie98 wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the buffer offset in IamfSpecificBox::Parse within media/formats/mp4/box_definitions.cc to use the current reader position. However, a critical security vulnerability was identified: the code does not validate whether the reader has enough remaining bytes before creating the span and copying its contents. This could lead to an out-of-bounds read if config_obus_size is larger than the remaining buffer size. It is recommended to add a validation check using reader->HasBytes(config_obus_size) before accessing the buffer.
Contributor
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
Fix IamfSpecificBox::Parse() to slice buffer from current position (reader->pos()) rather than offset 0 of the box header. Previously the offset wasn't respected, causing the box to be parsed incorrectly. Issue: 537956110 Change-Id: Ib11dcbc3af0940d987e8ad23c0595e86e513a216
osagie98
force-pushed
the
fix-iamf-parse-bug
branch
from
July 24, 2026 22:31
3e4e6f2 to
f32c464
Compare
borongc
approved these changes
Jul 24, 2026
borongc
left a comment
Member
There was a problem hiding this comment.
RS approval, and waiting for our partners to verify it.
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.
The IamfSpecificBox::Parse method previously sliced the buffer from the
start of the box header instead of the current reader position. This
resulted in the IAMF configuration OBUs being parsed incorrectly
because the offset from previous reads within the box was not being
respected.
Issue: 537956110