Skip to content

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

Closed

Description

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

Activity

  1. added
    WG-Remoting
    Issue-Bug
    on Oct 25, 2017
  2. iSazonov commented on Mar 8, 2020

    @iSazonov
    Collaborator

    Fixed in #5622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugResolution-FixedWG-Remoting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions