Skip to content

fix(serialization): bind assembly lookup and authorize generic roots - #11456

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-bind-type-authorization
Oct 9, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-bind-type-authorization

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Two type-authorization gaps let an assembly-qualified lookup fall back to a type outside the specified assembly and let approved generic arguments authorize an otherwise unknown generic root.

Bind qualified resolver callbacks to Assembly.GetType, preserving unqualified resolution and CLR type forwarding. In the resolved-type fallback, authorize generic definitions independently using existing manifest, name, assembly, and filter grants. Inspect later generic arguments after an unknown argument so an explicit denial still takes precedence.

Preserve explicit ITypeFilter grants for a closed generic construction, including unknown arguments, while honoring argument denials. Add focused regressions and update the serialization configuration and security guidance. These are scoped authorization corrections, with no public API changes.

Microsoft Reviewers: Open in CodeFlow

Copilot AI balanced review requested due to automatic review settings October 9, 2026 19:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The scoped authorization fixes are consistent with the documented policy and have focused regression coverage.

0 open findings

What changed in this PR

This PR closes two serialization type-authorization gaps while preserving unqualified resolution and CLR type forwarding.

Changes:

  • Binds qualified type resolution to the specified assembly.
  • Independently authorizes generic definitions and checks all arguments for denials.
  • Adds regression coverage and updates security/configuration guidance.
File Description
src/​Orleans.Serialization/​TypeSystem/​CachedTypeResolver.cs Prevents qualified lookups from falling back outside the specified assembly.
src/​Orleans.Serialization/​TypeSystem/​TypeConverter.cs Strengthens generic-root and argument authorization.
test/​Orleans.Serialization.UnitTests/​TypeConverterTests.cs Adds focused authorization and resolution regressions.
docs/​site/​src/​content/​docs/​security/​serialization.md Documents generic authorization security behavior.
docs/​site/​src/​content/​docs/​host/​configuration-guide/​serialization-configuration.md Explains configuration and filter semantics.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ReubenBond
ReubenBond merged commit d726b68 into dotnet:main Oct 9, 2026
89 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-bind-type-authorization branch October 9, 2026 19:47
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 83.38% (118,376 / 141,971)
Branches 72.90% (35,156 / 48,226)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 6138d8b, not current main d726b68.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
ReubenBond added a commit to ReubenBond/orleans that referenced this pull request Oct 22, 2026
ReubenBond added a commit that referenced this pull request Oct 23, 2026
This was referenced Oct 29, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants