Harden dynamic payload length parsing - #2468
Merged
Brian Robbins (brianrob) merged 3 commits intoSep 18, 2026
Merged
Brian Robbins (brianrob) merged 3 commits into
Brian Robbins (brianrob) merged 3 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Brian Robbins (brianrob)
left a comment
Member
There was a problem hiding this comment.
Thank you very much for contributing this. Overall, looks great. A couple of questions specific to the tests.
Preserve direct lookup coverage through public payload access and remove the synthetic private cache-state test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Brian Robbins (brianrob)
left a comment
Member
There was a problem hiding this comment.
Looks good. One follow-up and then I think we're good.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Brian Robbins (brianrob)
approved these changes
Sep 17, 2026
Brian Robbins (brianrob)
left a comment
Member
There was a problem hiding this comment.
LGTM. Thanks!
Brian Robbins (brianrob)
enabled auto-merge (squash)
September 17, 2026 23:30
Marius Sutara (msutara)
deleted the
users/marius/fix-dynamic-payload-lengths
branch
September 18, 2026 01:58
This was referenced Sep 29, 2026
Merged
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.
Summary
Fix dynamic TraceEvent payload parsing for unsigned length prefixes, invalid offsets, and truncated fixed-count arrays. This prevents oversized counted strings and arrays from producing negative or out-of-bounds payload reads.
Changes
Testing
dotnet test src\TraceEvent\TraceEvent.Tests\TraceEvent.Tests.csproj -c Debug --filter FullyQualifiedName~DynamicTraceEventParserVariableLengthFieldTests --no-restorePassed 143 tests on net462 and 143 tests on net8.0.