1. 15 6月, 2021 7 次提交
  2. 14 6月, 2021 8 次提交
    • F
      Fix NTLM authentication from macOS to Windows machines (#54101) · 17481fef
      Filip Navara 提交于
      * Fix NTLM authentication from macOS to Windows machines
      
      The GSSAPI implementation on macOS has partially broken NTLM implementation. It only supports NTLMv2 with the message integrity code (MIC) as specified by the MS-NLMP specification. The MIC is calculated using HMAC-MD5 authentication code over the exchanged NTLM messages with a key named ExportedSessionKey. The proper generation of ExportedSessionKey requires the implementation to negotiate correct capabilities, namely NTLMSSP_NEGOTIATE_KEY_EXCH and at least one of NTLMSSP_NEGOTIATE_SIGN or NTLMSSP_NEGOTIATE_SEAL flags. By default the macOS implementation negotiates NTLMSSP_NEGOTIATE_KEY_EXCH and sends MIC but fails to set one of the additional flags that would make the key exchange valid. This results in violation of the following part of the NTLM specification:
      
      "A session key MUST always exist to generate the MIC (section 3.1.5.1.2) in the authenticate message. NTLMSSP_NEGOTIATE_ALWAYS_SIGN MUST be set in the NEGOTIATE_MESSAGE to the server and the CHALLENGE_MESSAGE to the client."
      
      Adding the GSS_C_INTEG_FLAG flag forces macOS to properly negitiate all the necessary flags (NTLMSSP_NEGOTIATE_ALWAYS_SIGN and NTLMSSP_NEGOTIATE_SIGN) to make the MIC exchange valid. This in turn enables the whole NTLM exchange to be recognized as valid by Windows server side.
      
      The gss-ntlmssp package on Linux interprets the GSS_C_INTEG_FLAG flag as additional negotiation of NTLMSSP_NEGOTIATE_SIGN and NTLMSSP_NEGOTIATE_KEY_EXCH. That should not hurt anything and in fact it may improve security depending on specific configuration. The flag was already specified when NTLM was used by System.Net.Mail.SmtpClient.
      
      * Add temporary test to verify NTLM and Negotiate connections from all platforms
      
      Notably this is expected to fail on Android and tvOS where GSSAPI is not available.
      
      The test machine is single purpose virtual machine running in Azure with clean Windows Server 2019 installation and all the patches. It hosts IIS with single static page behind an NT authentication. The test account and the machine itself is disposable and does NOT contain any sensitive data. Nevertheless I don't expect this test to be merged.
      
      * Use full domain name in test credentials
      
      * Revert "Use full domain name in test credentials"
      
      This reverts commit ea4dc615824c207845628143addc7d8c774ce702.
      
      * Revert "Add temporary test to verify NTLM and Negotiate connections from all platforms"
      
      This reverts commit abf44ce1430edf631fe74b15d354eca9073b4c83.
      17481fef
    • D
      Set the async local just before execution (#54133) · 2ac5e2bb
      David Fowler 提交于
      * Set the async local just before execution.
      - Subscribing to DiagnosticListener.AllListeners replays all created DiagnosticListener instances. Because of this, we need to set the async local just before the execution of the entry point so that we only collect the events that are relevant to the call. Right now, it's also firing with the async local set pre-maturely.
      - Wrote a concurrency test to make sure it's safe to instantiate the factory in parallel.
      2ac5e2bb
    • E
      Make JsonSerializer work when IsDynamicCodeSupported is false. (#54027) · 49fa010d
      Eric Erhardt 提交于
      Use the non-Emit codepath if IsDynamicCodeSupported is false.
      49fa010d
    • J
      Logging Generator: messaging fix (#54080) · 469db3d7
      Jeff Layton 提交于
      469db3d7
    • H
      Cleanup BitVector32 (#54097) · 342e4cd6
      Huo Yaoyuan 提交于
      * Cleanup BitVector32
      
      * Cleanup Section.ToString
      342e4cd6
    • M
      [MacCatalyst][libraries] Skip Crashing test suites (#53625) · bc16a7bd
      Mitchell Hwang 提交于
      * [MacCatalyst][libraries] Skip Crashing test suites
      
      * Fix typos
      
      * Add System.Linq.Parallel skip AppCrash
      
      * Add Amore arm64 flakes
      
      * Add additional App Launch Failure skip
      
      * Add System.IO.UnmanagedMemoryStream.Tests skip
      
      * Add more tests failing to app launch failures
      Co-authored-by: NMitchell Hwang <mitchell.hwang@microsoft.com>
      bc16a7bd
    • A
      Remove allocation from MsQuicAddressHelpers.IPEndPointToINet (#54095) · af5c2385
      Austin Wise 提交于
      Assuming that GetAddressBytes() does not have side effects, this call
      should not be needed.
      
      Clean up from dotnet/runtime#53461
      af5c2385
    • J
      Infrastructure: correct dependencies and clean helix agent from stray corerun procs (#54094) · 86cebb31
      Juan Hoyos 提交于
      * Add dependency on coreclr in monojit/monointerpreter jobs explicitly to solve pipeline issue #53842
      * Use Helix Pre/Post hooks to kill linkering corerun instances to work around ARM64 agent issues
      Co-authored-by: NKunal Pathak <Kunal.Pathak@microsoft.com>
      86cebb31
  3. 12 6月, 2021 9 次提交
    • T
      fix ConnectWithCertificateChain quic test (#54026) · 4aa29f43
      Tomas Weinfurt 提交于
      4aa29f43
    • D
      Scope events to the execution of the entry point (#54090) · 2a011f80
      David Fowler 提交于
      * Scope events to the execution of the entry point
      - Today we're using the global event source and events that fire in the app domain get captured and this can result in capturing the wrong instances. This fix uses an async local to scope the events for the HostingEventListener to the execution of the application's entry point.
      - Removed the RemoteExecutor as a result of this change
      - Remove RequirementsMet property
      2a011f80
    • D
      Add support for IServiceProviderIsService (#54047) · c14ac488
      David Fowler 提交于
      * Add support for IServiceProviderIsService
      - This optional service lets consumers query to see if a service is resolvable without side effects (not having to explicitly resolve the service).
      - Added new spec tests to verify the baseline behavior based on IServiceCollection features.
      - Handle built in services as part of IsServce
      - Special case built in services as part of the IsService check
      - Make the tests part of the core DI tests and enable skipping via a property
      Co-authored-by: NTravis Illig <tillig@paraesthesia.com>
      c14ac488
    • A
    • S
      Fix Deflate/Brotli/CryptoStream handling of partial and zero-byte reads (#53644) · 68dec6ac
      Stephen Toub 提交于
      Stream.Read{Async} is supposed to return once at least a byte of data is available, and in particular, if there's any data already available, it shouldn't block.  But Read{Async} on DeflateStream (and thus also GZipStream and ZLibStream), BrotliStream, and CryptoStream won't return until either it hits the end of the stream or the caller's buffer is filled.  This makes it behave very unexpectedly when used in a context where the app is using a large read buffer but expects to be able to process data as it's available, e.g. in networked streaming scenarios where messages are being sent as part of bidirectional communication.
      
      This fixes that by stopping looping once any data is consumed.  Just doing that, though, caused problems for zero-byte reads.  Zero-byte reads are typically used by code that's trying to delay-allocate a buffer for the read data until data will be available to read.  At present, however, zero-byte reads return immediately regardless of whether data is available to be consumed.  I've changed the flow to make it so that zero-byte reads don't return until there's at least some data available as input to the inflater/transform (this, though, doesn't 100% guarantee the inflater/transform will be able to produce output data).
      
      Note that both of these changes have the potential to introduce breaks into an app that erroneously depended on these implementation details:
      - If an app passing in a buffer of size N to Read{Async} depended on that call always producing the requested number of bytes (rather than what the Stream contract defines), they might experience behavioral changes.
      - If an app passing in a zero-byte buffer expected it to return immediately, it might instead end up waiting until data was actually available.
      68dec6ac
    • H
      Expose RoundUpToPowerOf2 (#53992) · ffcef4af
      Huo Yaoyuan 提交于
      * 32bit
      
      * 64bit
      
      * Expose in public api
      
      * Unit test
      
      * Add more tests
      
      * Use in test
      
      * Apply suggestions from code review
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      Co-authored-by: NStephen Toub <stoub@microsoft.com>
      ffcef4af
    • T
      make MsQuicStatusCodes platform specific (#54031) · cf10c2dc
      Tomas Weinfurt 提交于
      * make MsQuicStatusCodes platform specific
      
      * add missing StreamLimit
      cf10c2dc
    • M
      Re-enabled mock tests for H/3. (#53802) · 9ea8c200
      Marie Píchová 提交于
      * Re-enabled mock tests for H/3.
      
      * Used IsMockQuicSupported to run the mock tests only on supported platforms.
      
      * Disabling mock test completely.
      
      * Hanging test fix experiment.
      
      * Disabled some mock tests failing in CI.
      9ea8c200
    • I
      Vector.Sum(Vector<T>) API implementation for horizontal add. (#53527) · 6afe03ef
      Ivan Zlatanov 提交于
      * Vector.Sum(Vector<T>) API implementation for horizontal add.
      
      * Fixed inccorrect referece to Arm64 AddAccross intrinsic function.
      
      * Added implementation for hardware accelerated Vector<T>.Sum for long, ulong, float, double on ARM64.
      
      * Fixed formatting issue.
      
      * Correctness.
      
      * Fixed compiler error for ARM64.
      
      * Formatting issue.
      
      * More explicit switch statement. Fixed wrong simd size for NI_Vector64_ToScalar.
      
      * Fixed auto formatting issue.
      
      * Use AddPairwiseScalar for double, long and ulong on ARM64 for VectorT128_Sum.
      
      * Forgot ToScalar call after AddPairwiseScalar.
      
      * Fixed wrong return type.
      6afe03ef
  4. 11 6月, 2021 13 次提交
  5. 10 6月, 2021 3 次提交