dotnet / dotnet/runtime

[Android arm32] System.Security.Cryptography.Pkcs.Tests crashes in HmacCreate

Open
#131,856 4 comments 0 reactions 1 assignee Claimed by @vcsjones View on GitHub
arch-arm32 area-System.Security blocking-clean-ci Known Build Error os-android
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

## Build Information

Build: [20260803.2](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1538577&view=logs&j=0b9de2ad-9c51-5b24-9379-8badf4809d19&t=2eb7f626-1d35-5ccd-cc54-e41e24bef8a5)

Build error leg or test failing: `android-arm Release AllSubsets_CoreCLR` - `System.Security.Cryptography.Pkcs.Tests`

- Pipeline: `runtime-extra-platforms`
- Branch: `main`
- Commit: `10c04f707d28097296d509a66c6123ee848361e0`
- Helix queue: `Windows.11.Amd64.Android-armel.Open`
- Helix work item: [System.Security.Cryptography.Pkcs.Tests](https://helix.dot.net/api/jobs/72fef8b1-9f57-4304-b841-1e9cc1419db1/workitems/System.Security.Cryptography.Pkcs.Tests?api-version=2019-06-17)
- [Console log](https://helix.dot.net/api/2019-06-17/jobs/72fef8b1-9f57-4304-b841-1e9cc1419db1/workitems/System.Security.Cryptography.Pkcs.Tests/console)

## Error Details

The Android arm32 test process crashes while `Pkcs12InfoTests.ReadEmptyPfx(Int32)` verifies a PKCS#12 MAC. XHarness reports exit code 80 (`APP_CRASH`).

```text
Fatal error.
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the runtime or one of the native libraries
used by your application.
at Interop+Crypto.g____PInvoke|96_0(Byte*, Int32, IntPtr)
at System.Security.Cryptography.HMACCommon.ChangeKeyImpl(System.ReadOnlySpan`1)
at System.Security.Cryptography.IncrementalHash.CreateHMAC(System.Security.Cryptography.HashAlgorithmName, System.ReadOnlySpan`1)
at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.VerifyMac(System.ReadOnlySpan`1, System.ReadOnlySpan`1)
at System.Security.Cryptography.Pkcs.Pkcs12Info.VerifyMac(System.ReadOnlySpan`1)
at System.Security.Cryptography.Pkcs.Pkcs12Info.VerifyMac(System.String)
at System.Security.Cryptography.Pkcs.Tests.Pkcs12.Pkcs12InfoTests.ReadEmptyPfx(Int32)

XHarness exit code: 80 (APP_CRASH)
```

## Error Message

```json
{
"ErrorMessage": [
"Got a SIGSEGV while executing native code.",
"at Interop+Crypto.",
"at System.Security.Cryptography.Pkcs.Tests.Pkcs12.Pkcs12InfoTests.ReadEmptyPfx(Int32)"
],
"BuildRetry": false,
"ExcludeConsoleLog": false
}
```

## Duplicate Search

No existing issue was found for this `HmacCreate` / `ReadEmptyPfx` Android SIGSEGV signature. #37094 is a closed historical issue for different PKCS failures on Android.

> [!NOTE]
> This issue was drafted with GitHub Copilot assistance.

### Known issue validation
**Build: :mag_right:** https://dev.azure.com/dnceng-public/public/_build/results?buildId=1538577
**Error message validated:** `[Got a SIGSEGV while executing native code. at Interop+Crypto. at System.Security.Cryptography.Pkcs.Tests.Pkcs12.Pkcs12InfoTests.ReadEmptyPfx(Int32)`]
**Result validation:** :white_check_mark: Known issue matched with the provided build.
**Validation performed at:** 8/5/2026 6:51:18 AM UTC

### Report

|Build|Repository|Test|Pull Request|
|---|---|---|---|
|[1555560](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1555560)|dotnet/runtime|[System.Security.Cryptography.Pkcs.Tests.WorkItemExecution](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1555560&view=ms.vss-test-web.build-test-results-tab&runId=42812738&resultId=199671)||
#### Summary
|24-Hour Hit Count|7-Day Hit Count|1-Month Count|
|---|---|---|
|0|0|1|

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.