GH-49697: [C++][CI] Check IPC file body bounds are in sync with decoder outcome#49698
Draft
pitrou wants to merge 1 commit intoapache:mainfrom
Draft
GH-49697: [C++][CI] Check IPC file body bounds are in sync with decoder outcome#49698pitrou wants to merge 1 commit intoapache:mainfrom
pitrou wants to merge 1 commit intoapache:mainfrom
Conversation
Member
Author
|
@github-actions crossbow submit -g cpp |
|
Revision: 44711e3 Submitted crossbow builds: ursacomputing/crossbow @ actions-cc0beb58ed |
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.
Rationale for this change
When we read an IPC message from an IPC file, we validate its associated body size against the amount required by the streaming decoder. However, we're currently only checking that the body size is large enough, not that it's exactly as expected.
An invalid IPC file might advertise in its footer a
metaDataLengththat's larger than the actual serialized Flatbuffers payload. In that case, the associated body would start before the offset computed from the IPC file footer.What changes are included in this PR?
Strengthen body size check against expected decoder read, to ensure that the metadata length advertised in the IPC file footer is consistent with the actual size of the Flatbuffers-serialized metadata.
Are these changes tested?
By additional fuzz regression file.
Are there any user-facing changes?
No.