-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[Question] [Android] Crash due to crypto asserts #77258
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsI'm currently experiencing this exact issue (#61783) during calls involving
This issue has already been fixed in #61827. My question is: How can I now use the fixed runtime version? Sorry for opening an issue for that...
|
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsI'm currently experiencing this exact issue (#61783) during calls involving
This issue has already been fixed in #61827. My question is: How can I now use the fixed runtime version? Sorry for opening an issue for that...
|
#61827 didn't make the cut for .NET 6, so it's only present in .NET 7. Can you confirm if the issue is resolved in the RC2 for .NET 7?
Looks like that can happen when an empty runtime/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/HKDF.cs Line 167 in 7d06aff
abort .
For ECDH the assert will trip if the secretPrepend or secretAppend are empty (an entirely reasonable thing to do) runtime/src/libraries/Common/src/System/Security/Cryptography/ECDiffieHellmanDerivation.cs Line 28 in 7d06aff
So that explains where/why those APIs are hitting the empty HMAC update. @bartonjs @steveisok do we want to fix this for .NET 6? Since those higher-level primitives can hit the |
Yeah, process crashes are bad. We should service them. Are all of these already fixed in 7 and we just need to backport to 6? |
To my knowledge, yes. I will start a backport PR. |
I think backporting to 6 is fine and low risk. |
Thanks for your quick response!
I tried to test that, but I couldn't get my android project to compile with the net7.0 preview in the limited amount of time I had.
That’s exactly my scenario!
If you could successfully backport the fix, that would be great! |
A backport PR has been opened for this at #77283. That doesn't definitely mean it's going to be fixed for .NET 6, yet. It still needs approval for servicing. |
The backport PR has been approved and merged, and should be in .NET 6.0.12 when it's released. I don't think there is anything else this issue is tracking, so closing this out. |
I'm currently experiencing this exact issue (#61783) during calls involving
hmac
such as...ECDiffieHellman.DeriveKeyFromHmac
HKDF.Expand
This issue has already been fixed in #61827.
My question is: How can I now use the fixed runtime version?
I'm targeting
net6.0-android31.0
(.net 6.0.402 sdk).Sorry for opening an issue for that...
The text was updated successfully, but these errors were encountered: