Handle truncation errors in diagnostic IPC transport names - #132220
Merged
Conversation
Propagate failures when generating diagnostic IPC socket names and reject truncated or empty Unix-domain socket paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 572c5f77-8001-4916-b5d1-502c66b60415
max-charlamb
requested review from
lateralusX,
mdh1418 and
noahfalk
as code owners
August 12, 2026 17:11
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens EventPipe diagnostics IPC socket name generation on Unix by treating name-generation failures (including truncation) as fatal, preventing an empty sockaddr_un.sun_path from accidentally binding in the Linux abstract namespace.
Changes:
- Propagate
PAL_GetTransportNamefailure by checking forname[0] != '\0'(rather than assuming success). - Reject truncated or empty Unix-domain socket paths during UDS address allocation, and add error-path cleanup to avoid leaks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/native/eventpipe/ds-ipc-pal-socket.c | Validates UDS socket path generation/copying, rejects truncation/empty paths, and adds structured cleanup on error. |
| src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h | Makes ds_rt_transport_get_default_name report failure when PAL_GetTransportName leaves the output empty. |
steveisok
approved these changes
Aug 12, 2026
max-charlamb
enabled auto-merge (squash)
August 12, 2026 18:02
noahfalk
approved these changes
Aug 13, 2026
Member
Author
|
/ba-g unrelated test failures |
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
Port the EventPipe diagnostic IPC transport fix from dotnet/dotnet#8241 (commit
90e1097e9e4ad09e4aa3da19bf7dd73ee0eaaa2a) tomain.PAL_GetTransportNamereports failure by leaving the output empty. Propagate that failure and reject truncated or empty Unix-domain socket paths instead of allowing an emptysun_pathto bind in the Linux abstract namespace.Testing
build.cmd clr.runtime -rc checkedbuild.cmd clr.corelib+clr.nativecorelib+libs.pretest -rc checked -lc releasesrc\tests\build.cmd -Test tracing/eventpipe/diagnosticport/diagnosticport.csproj x64 Checkeddiagnosticport.cmdwithDOTNET_TieredCompilation=0Note
This pull request description was generated with GitHub Copilot.