Skip to content

[release/10.0] Account for default Windows NTLM signing in NegotiateStream tests - #138198

Merged
lewing merged 1 commit into
release/10.0from
backport/pr-138129-to-release/10.0
Nov 24, 2026
Merged

lewing merged 1 commit into
release/10.0from
backport/pr-138129-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #138129 to release/10.0

/cc @rzikm

Windows updates released on and after November 10, 2026 offer NTLM signing by default, even when an application does not request integrity. This exposes two outdated assumptions in the Windows-only NegotiateStream tests: ProtectionLevel.None implies no signing, and a None-client/Sign-server handshake must fail. The failing assertions concern IsSigned, not IsEncrypted, and affect both CoreCLR and NativeAOT Windows CI.

Allow optional signing for the None cases while retaining every encryption assertion, requiring signing for encrypted contexts, and checking that client and server signing agree. Change the negative test's server requirement to EncryptAndSign so default signing cannot satisfy the mismatch. No production code or test skips are changed.

Customer Impact

Test-only change

Regression

No regression in .NET. Caused by Windows update.

Testing

Tests in CI

Risk

Low, test-only change

…38129)

<!-- -->
Windows updates released on and after November 10, 2026 [offer NTLM
signing by
default](https://support.microsoft.com/en-us/servicing/os/windows/docs/2026/11/kb5135557-ntlm-signing-security-improvements),
even when an application does not request integrity. This exposes two
outdated assumptions in the Windows-only NegotiateStream tests:
`ProtectionLevel.None` implies no signing, and a None-client/Sign-server
handshake must fail. The failing assertions concern `IsSigned`, not
`IsEncrypted`, and affect both CoreCLR and NativeAOT Windows CI.

Allow optional signing for the None cases while retaining every
encryption assertion, requiring signing for encrypted contexts, and
checking that client and server signing agree. Change the negative
test's server requirement to `EncryptAndSign` so default signing cannot
satisfy the mismatch. No production code or test skips are changed.

### Validation

On Windows build 26100 with installed .NET 12, a standalone harness
compiled the complete two test source files with real xUnit assertions
and repository DelayStream, IdentityValidator and timeout helpers. It
uses socket streams and standalone test-host adapters, not the
repository testhost.

- `dotnet build .\source-tests.csproj --no-restore --verbosity quiet
-p:SourceRoot=<exported-original-sources>` followed by `dotnet
.\bin\Debug\net12.0\source-tests.dll`: original sources reproduced the
same seven failures; 33 passed, 7 failed.
- `dotnet build .\source-tests.csproj --no-restore --verbosity quiet`
followed by `dotnet .\bin\Debug\net12.0\source-tests.dll`: patched
sources passed all 40 cases, covering authentication with delays 0/1 and
target names across all 13 variants, plus the protection mismatch test.
- `dotnet run --project .\negotiate-probe.csproj --verbosity quiet`: 16
protocol cases passed across synchronous/asynchronous authentication,
empty/named targets and four protection-level pairs. Successful cases
checked data roundtrips; mismatches checked both
AuthenticationExceptions and rejected writes.
- `git diff --check`: passed.

Full repository build/test suite, NativeAOT execution and old/new
Windows Server 2019 container replay were not run. Container-update
timing supports the Windows hardening diagnosis but was not A/B tested.

Resolves #138073
Resolves #138074

> [!NOTE]
> This PR description and code changes were generated with GitHub
Copilot.

Co-authored-by: Copilot App <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@rzikm

rzikm commented Nov 24, 2026

Copy link
Copy Markdown
Member

Test only change arrow tell mode.

@rzikm

rzikm commented Nov 24, 2026

Copy link
Copy Markdown
Member

/ba-g Test failures are known.

@lewing
lewing merged commit 1abe1ee into release/10.0 Nov 24, 2026
97 of 100 checks passed
@lewing
lewing deleted the backport/pr-138129-to-release/10.0 branch November 24, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants