Skip to content

Update wolfBoot emulator CI image to m33mu v1.25 - #249

Merged
Frauschi merged 1 commit into
wolfSSL:masterfrom
LinuxJedi:update-m33mu-ci-image
Oct 15, 2026
Merged

Frauschi merged 1 commit into
wolfSSL:masterfrom
LinuxJedi:update-m33mu-ci-image

Conversation

@LinuxJedi

Copy link
Copy Markdown
Member

Moves the wolfBoot emulator test (wolfboot-integration.yml) from ghcr.io/wolfssl/wolfboot-ci-m33mu:v1.2 to :v1.25.

stm32h5-pkcs11-single-boot has been failing intermittently during first-boot token provisioning, and a re-run always passes. Since August, 7 of 214 attempts failed. gh run list hides most of these, because it only shows the final, passing attempt. The errors vary:

These are not caused by wolfPKCS11:

  • The same C_Login(SO) failure happened on code that contains neither 89b9e8e nor 15b24f9, the recent PIN-handling changes.
  • Every C_Login(SO) failure stops at exactly 17906800 emulator cycles with the same PC and LR, even across commits and builds with different signing keys and TRNG data. The run is identical up to the failing call. 0xa0 there means the recomputed scrypt PIN hash did not match the stored one, and that code path cannot return the error codes that also map to CKR_PIN_INCORRECT.
  • On a host build, 10,000 InitToken / Login(SO) / InitPIN / Login(USER) sequences with wolfBoot's PIN settings, WOLFSSL_SMALL_STACK, and ASAN+UBSAN found no failures and no sanitizer reports.
  • Off the GitHub runners I could not reproduce it. With the exact v1.2 image (digest a40a465), 860 boots passed, including 60 across 6 fresh builds of the Compute CKA_CHECK_VALUE by secret key type #248 merge that failed 2 out of 2 in CI. Another 640 passed on locally built m33mu (March source and current HEAD).

v1.2 was built on 2026-03-25. This workflow was already cut back to a single boot that day because of an "unstable emulator" (0ad9762). Since then m33mu has fixed a long list of CPU and exception bugs. These include IT-block state, lazy FP save and FP frame layout, Secure/Non-secure additional-state unwinding, NVIC preemption and EXC_RETURN.ES, SysTick banking by security state, and cross-domain EXC_RETURN/CONTROL.SPSEL handling. This test exercises those paths: the stm32h5 test app starts a 1 kHz Non-secure SysTick and the USART3 IRQ before it calls into the Secure PKCS11 API.

wolfBoot's own trustzone-emulator-tests.yml runs the same first-boot and second-boot PKCS11 test on :latest, which is the same image as v1.25 (built 2026-09-23). In its last 400 runs it had no PKCS11 failures. v1.25 is pinned here rather than latest so that image updates stay explicit.

Testing: the CI run on this PR. No source changes.

The stm32h5-pkcs11-single-boot job fails intermittently (about 3% of
attempts since August) during first-boot token provisioning, with
CKR_PIN_INCORRECT from C_Login(SO) or C_Login(USER), or
CKR_FUNCTION_FAILED from C_InitToken or C_CreateObject. A re-run passes.
The failures happen with and without recent wolfPKCS11 changes, and the
run is cycle-identical up to the failing call, so this is not a
wolfPKCS11 bug.

The v1.2 image was built on 2026-03-25. m33mu has since fixed many
exception-handling, IT-block and FPU emulation bugs, including the
handling of Non-secure interrupts that preempt Secure code. That is the
path this test exercises: the test app runs a 1 kHz SysTick during the
Secure PKCS11 calls. wolfBoot's own CI runs the same first-boot test on
the latest image (v1.25) and has had no PKCS11 failures in its last 400
runs.
Copilot AI balanced review requested due to automatic review settings October 15, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Successful completion of the integration test with the updated image remains unconfirmed.

0 open findings

What changed in this PR

Updates the wolfBoot emulator image to address intermittent first-boot PKCS11 provisioning failures.

Changes:

  • Pins the CI image to v1.25 instead of v1.2.
  • Leaves test steps and application source unchanged.
File Description
.github/​workflows/​wolfboot-integration.yml Updates the m33mu container image tag to v1.25.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Frauschi
Frauschi merged commit 6db9354 into wolfSSL:master Oct 15, 2026
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants