Repository navigation
[release/11.0] Account for default Windows NTLM signing in NegotiateStream tests - #138197
Merged
Merged
Conversation
…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: 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. |
Contributor
|
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
Member
|
Test only change => tell mode. |
This was referenced Nov 24, 2026
MihaZupan
approved these changes
Nov 24, 2026
Member
|
/ba-g Test failures are known. |
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.
Backport of #138129 to release/11.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