-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/6.0] Fix process aborts when using cryptographic primitives with empty input for Android #77283
Conversation
Fix Android crypto asserts (dotnet#61827) This fixes three asserts that were started occurring in the native Android cryptographic primitives. - One shot hashing now tolerates empty/null input. - Hashing and HMAC will now no-op if the append is empty. - RSA encryption now tolerates empty/null input.
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsBackport of #61827 to release/6.0. /cc @bartonjs @steveisok Customer ImpactReported by a customer is #77258. Customers that use HMAC APIs to append data, or use APIs that append HMAC data, and that data is empty will see a process crash (SIGABRT) in Android. Some higher-level APIs such as HKDF or TestingThese changes have been present in .NET 7 for quite some time. Existing tests caught this behavior for .NET 7. RiskLow. The changes are well understood and isolated. IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
CI results were too old and were deleted. There were some infra problems back then. I'm closing and reopening, hopefully we get cleaner results. |
CI failure in System.Data.OleDb showed up before and after the CI re-run. It is #74488 |
There are some warning failures in Android, but none in cryptography relates tests. I think this is ready to merge since it has been approved by Tactics and signed off. It also does not need OOB package authoring changes since it's native Android code. |
Backport of #61827 to release/6.0.
/cc @bartonjs @steveisok
Customer Impact
Reported by a customer is #77258. Customers that use HMAC APIs to append data, or use APIs that append HMAC data, and that data is empty will see a process crash (SIGABRT) in Android.
Some higher-level APIs such as HKDF or
ECDiffieHellman
will append empty data the HMAC. Customers using these APIs that do that have no reasonable work around.Testing
These changes have been present in .NET 7 for quite some time. Existing tests caught this behavior for .NET 7.
Risk
Low. The changes are well understood and isolated.
IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.