Skip to content

PrioritySendDataCollection.Clear() can throw a null reference exception #5219

@dantraMSFT

Description

@dantraMSFT

If the system is not configured correctly for SSL, enter-pssession fails. However, the error that is reported is a NullReferenceException at PrioritySendDataCollection.Clear() due to missing null check. The result is a misleading error that results in investigating the wrong issue.
This was seen on Debian 9 which did not have openssl 1.0.0.

Steps to reproduce

Create an instance of PrioritySendDataCollection
Call Clear()

Expected behavior

The call is silently ignored.

Actual behavior

A NullReferenceException is thrown when attempting to dereference the null _syncObject array.
Early test results - Debian9 has a catastrophic failure after running new-pssession - the shell exits with

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-RemotingPSRP issues with any transport layer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions