Skip to content

Comments

Add more null checks to request.cpp#124451

Merged
leculver merged 3 commits intodotnet:mainfrom
leculver:issue_5632
Feb 18, 2026
Merged

Add more null checks to request.cpp#124451
leculver merged 3 commits intodotnet:mainfrom
leculver:issue_5632

Conversation

@leculver
Copy link
Contributor

@leculver leculver commented Feb 16, 2026

I'm seeing crashes on linux in diagnostic tools (clrmd, sos, dotnet-dump analyze). These come from tools not validating their calls into the dac. I'm fixing this in those tools, but older versions of those tools will call with null values in some cases. This fix will simply stop us from crashing with a SIGSEGV on linux since we do not swallow crashes on that OS.

Contributes to: dotnet/diagnostics#5632.

@leculver leculver requested a review from hoyosjs February 16, 2026 01:42
@leculver leculver self-assigned this Feb 16, 2026
Copilot AI review requested due to automatic review settings February 16, 2026 01:42
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens CoreCLR’s SOS DAC request handling to avoid Linux SIGSEGVs when older diagnostic tools call into the DAC with null/zero arguments, returning explicit HRESULTs instead of crashing.

Changes:

  • Added argument validation to reject zero CLRDATA_ADDRESS inputs in several DAC entrypoints.
  • Added broader parameter validation for GetAssemblyName to avoid invalid buffer/size combinations.
  • Tightened GetAssemblyData validation to reject a null assembly address.

Copilot AI review requested due to automatic review settings February 16, 2026 01:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@leculver leculver merged commit 5c12c98 into dotnet:main Feb 18, 2026
100 of 102 checks passed
@leculver leculver deleted the issue_5632 branch February 18, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants