Skip to content

Conversation

@vcsjones
Copy link
Member

This assert is asserting that the key is not IsInvalid, but this is not a valid assumption when using the key and disposing of it is raced.

We have a test for that race here #107929 which got hit at #107929. This was also reported in #105715.

We should remove the assert and just get SafeHandle's do their thing since they correctly handle validity of the handle (when used correctly).

@dotnet-policy-service
Copy link
Contributor

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

@vcsjones vcsjones merged commit 06ebfc2 into dotnet:main Sep 17, 2024
83 of 85 checks passed
@vcsjones
Copy link
Member Author

/backport to release/9.0

@github-actions
Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/10911351543

@vcsjones vcsjones deleted the remove-newkey-assert branch September 17, 2024 21:25
@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants