Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash caused by corrupted stack in System.Net.Quic tests #62613

Closed
jkotas opened this issue Dec 10, 2021 · 6 comments · Fixed by #62617
Closed

Crash caused by corrupted stack in System.Net.Quic tests #62613

jkotas opened this issue Dec 10, 2021 · 6 comments · Fixed by #62617

Comments

@jkotas
Copy link
Member

jkotas commented Dec 10, 2021

Crash dump: runfo get-helix-payload -j 5b5b3a98-af71-44f7-96d2-3e4df7dcae00 -w System.Net.Http.Functional.Tests -o c:\helix_payload\System.Net.Http.Functional.Tests

Hit by #62590

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Net.Http untriaged New issue has not been triaged by the area owner labels Dec 10, 2021
@ghost
Copy link

ghost commented Dec 10, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Crash dump: runfo get-helix-payload -j 5b5b3a98-af71-44f7-96d2-3e4df7dcae00 -w System.Net.Http.Functional.Tests -o c:\helix_payload\System.Net.Http.Functional.Tests

Hit by #62590

Author: jkotas
Assignees: -
Labels:

area-System.Net.Http, untriaged

Milestone: -

@jkotas
Copy link
Member Author

jkotas commented Dec 10, 2021

The crash is caused by stack corrupted around the call to ConfigurationLoadCredentialDelegate.

There is one obvious interop problem in mismatched definition of CredentialConfig structure. The unmanaged version of this structure has AllowedCipherSuites field that is missing in the managed definition. This problem alone cannot explain the crash, there are likely more similar interop issues, potentially in interop calls done that happened earlier.

@ghost
Copy link

ghost commented Dec 10, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Crash dump: runfo get-helix-payload -j 5b5b3a98-af71-44f7-96d2-3e4df7dcae00 -w System.Net.Http.Functional.Tests -o c:\helix_payload\System.Net.Http.Functional.Tests

Hit by #62590

Author: jkotas
Assignees: -
Labels:

area-System.Net.Http, untriaged, area-System.Net.Quic

Milestone: -

@wfurt
Copy link
Member

wfurt commented Dec 10, 2021

thanks for looking into it @jkotas. AFAIK the AllowedCipherSuites was added later AFAIK e.g. after the initial code was written and failed to notice the difference. There was debate that the low-level binding would move to msquic it self but that did not happened (yet?)

cc: @nibanks @ThadHouse

@thhous-msft
Copy link

The AllowedCipherSuites field is only read if QUIC_CREDENTIAL_FLAG_SET_ALLOWED_CIPHER_SUITES is passed as one of the flags. And it doesn't seem like that is happening from the .NET side, so I suspect its unrelated.

@jkotas
Copy link
Member Author

jkotas commented Dec 10, 2021

Yes, I agree that the crash is unrelated to the mismatched definition of CredentialConfig. It seems to be regression in the runtime introduced by recent change (#62271)

jkotas added a commit to jkotas/runtime that referenced this issue Dec 10, 2021
Forward delegate interop stubs do not use hidden argument. The hidden argument passed to them is a random value that can lead to crash during stackwalking.

Fixes dotnet#62613
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 10, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Dec 10, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 9, 2022
@karelz karelz added this to the 7.0.0 milestone Jan 11, 2022
@karelz karelz removed the untriaged New issue has not been triaged by the area owner label Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants