From dda44e1ede5853ca2f96350d411a1777bc8fa9c7 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Fri, 17 Dec 2021 15:35:23 +0300 Subject: [PATCH] Disable some suspicious tests which might lead to OOM crashes on Android emulators and arm64 devices (#62767) Just blindly disabling several crypto tests near which crashes have been observed for a while (based on a couple of the mobile targets rolling build runs). Disabled tests: - System.Security.Cryptography.Rsa.Tests.RSAKeyFileTests.ReadWriteDiminishedDPPrivatePkcs1 - System.Security.Cryptography.Rsa.Tests.RSAKeyFileTests.ReadEncryptedDiminishedDP_EmptyPassword - System.Security.Cryptography.Rsa.Tests.RSAKeyFileTests.DecryptPkcs12PbeTooManyIterations - System.Security.Cryptography.Rsa.Tests.RSAKeyFileTests.ReadWriteRsa2048EncryptedPkcs8_Pbes2HighIterations - System.Security.Cryptography.Dsa.Tests.DSAKeyFileTests.cs.DecryptPkcs12PbeTooManyIterations - System.Security.Cryptography.Dsa.TestsDSAKeyFileTests.cs.ReadWriteDsa1024EncryptedPkcs8_Pbes2HighIterations - System.Security.Cryptography.Tests.ECKeyFileTests.DecryptPkcs12PbeTooManyIterations - System.Security.Cryptography.Tests.ECKeyFileTests.ReadWriteEc256EncryptedPkcs8_Pbes2HighIterations - System.Security.Cryptography.EcDsa.Tests.ECDsaTests_Span See also https://github.com/dotnet/runtime/issues/62547. --- .../Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs | 2 ++ .../Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs | 2 ++ .../AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs | 1 + .../Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs index 5f3a0f5..6564a97 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSAKeyFileTests.cs @@ -565,6 +565,7 @@ vAB5Wz646GeWztKawSR/9xIqHq8IECV1FXI=", } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public static void DecryptPkcs12PbeTooManyIterations() { // pbeWithSHAAnd3-KeyTripleDES-CBC with 600,001 iterations @@ -585,6 +586,7 @@ KaC843/LqYiSNoD7rBPpSpkyLtldwhqc7o2Wz7tyb1Oj8WF47AJD5OI="); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public static void ReadWriteDsa1024EncryptedPkcs8_Pbes2HighIterations() { // pkcs5PBES2 hmacWithSHA256 aes128-CBC with 600,001 iterations diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs index dcfe4e8..689e139 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/ECKeyFileTests.cs @@ -959,6 +959,7 @@ HMdNrq/BAgECAywABAIRJy8cVYJCaIjpG9aSV3SUIyJIqgQnCDD3oQCa1nCojekr } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public void DecryptPkcs12PbeTooManyIterations() { // pbeWithSHAAnd3-KeyTripleDES-CBC with 600,001 iterations @@ -976,6 +977,7 @@ Tj/54rcY3i0gXT6da/r/o+qV"); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public void ReadWriteEc256EncryptedPkcs8_Pbes2HighIterations() { // pkcs5PBES2 hmacWithSHA256 aes128-CBC with 600,001 iterations diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs index e2040d4..eb12b87 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.netcoreapp.cs @@ -7,6 +7,7 @@ using Xunit; namespace System.Security.Cryptography.EcDsa.Tests { [SkipOnPlatform(TestPlatforms.Browser, "Not supported on Browser")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public sealed class ECDsaTests_Span : ECDsaTests { protected override bool VerifyData(ECDsa ecdsa, byte[] data, int offset, int count, byte[] signature, HashAlgorithmName hashAlgorithm) => diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs index f3f9b1b..d79be4e 100644 --- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs +++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/RSA/RSAKeyFileTests.cs @@ -107,6 +107,7 @@ CE5b4bVi7nbp+SyaseWurZ0pGmM35N6FveZ6DXK05Vrc8gf3paUiXhU=", } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public static void ReadWriteDiminishedDPPrivatePkcs1() { ReadWriteBase64PrivatePkcs1( @@ -789,6 +790,7 @@ RdMKfFP3he4C+CFyGGslffbxCaJhKebeuOil5xxlvP8aBPVNDtQfSS1HXHd1/Ikq } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public static void ReadEncryptedDiminishedDP_EmptyPassword() { // [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Suppression approved. Unit test key.")] @@ -1254,6 +1256,7 @@ pWre7nAO4O6sP1JzXvVmwrS5C/hw"; } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public static void DecryptPkcs12PbeTooManyIterations() { // pbeWithSHAAnd3-KeyTripleDES-CBC with 600,001 iterations @@ -1290,6 +1293,7 @@ gms2YM+honjUS1sXk1zdm/8="); } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/62547", TestPlatforms.Android)] public static void ReadWriteRsa2048EncryptedPkcs8_Pbes2HighIterations() { // pkcs5PBES2 hmacWithSHA256 aes128-CBC with 600,001 iterations -- 2.7.4