[release/2.5] backport #6022: fix virtual buffer overflow in stream_recv#6071
Open
dkgkdfg65 wants to merge 1 commit into
Open
[release/2.5] backport #6022: fix virtual buffer overflow in stream_recv#6071dkgkdfg65 wants to merge 1 commit into
dkgkdfg65 wants to merge 1 commit into
Conversation
## Description Changed guard condition to fix virtual buffer issue.. ## Testing NA ## Documentation NA (cherry picked from commit 36367b6)
Author
|
@microsoft-github-policy-service agree |
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.
release/2.5 is missing the virtual-buffer overflow fix that's on main (#6022, 36367b6). In stream_recv.c the virtual buffer length math still uses a uint32 multiply that can wrap, so a crafted receive sequence can drive the buffer accounting past its bound.
checked it on release/2.5: built the stream_recv virtual-buffer length path with -fsanitize=address on ubuntu:22.04 and drove the wrapping multiply — pre-fix the invariant check aborts / the accounting overflows, with the main fix applied the value is clamped and it's clean. (modeled the buffer-math function rather than a full msquic build.)
clean cherry-pick (-x), original author (Gaurav Singh) preserved. the generated clog headers come along with the .c change as upstream had them. happy to rebase.
note: i'll sign the CLA when the bot prompts.
upstream: 36367b6361