Repository navigation
rtcp: account for fixed header size in report block validation - #2235
Closed
TristanInSec wants to merge 1 commit into
Closed
TristanInSec wants to merge 1 commit into
TristanInSec wants to merge 1 commit into
Conversation
rtcp_Xr() checks that el->len can hold count * sizeof(report_block) but does not subtract the fixed header that precedes the report blocks. A Sender Report has a 28-byte header before the blocks, a Receiver Report has 8 bytes. Without accounting for this, a packet just large enough for the header but with count=1 passes the check and the report block read goes past the buffer. Pass the header size into the validation so the check covers header + blocks.
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.
rtcp_Xr()validates thatel->lencan holdcount * sizeof(report_block), but the report blocks start after the fixed SR/RR header, not at offset 0. A Sender Report has 28 bytes of header before the blocks, a Receiver Report has 8. Without subtracting the header, a minimal-length packet withcount >= 1passes the check and the block iteration reads past the buffer.This passes the header size into the check so it covers header + blocks.