Skip to content

fix(migtd/spdm): clear exchange secrets on cancellation - #1101

Open
haitaohuang wants to merge 1 commit into
intel:mainfrom
haitaohuang:fix/spdm-cancellation-cleanup
Open

haitaohuang wants to merge 1 commit into
intel:mainfrom
haitaohuang:fix/spdm-cancellation-cleanup

Conversation

@haitaohuang

Copy link
Copy Markdown
Contributor

Summary

  • keep an exchange cleanup guard alive across SPDM migration and rebind operations
  • wipe encoded application-context secrets when a future is cancelled or fails
  • retire every exchange-owned SPDM session, including established sessions after FINISH clears the last handshake ID
  • cover requester/responder success, failure, cancellation, and repeated cleanup

Testing

Previously validated during branch preparation:

  • cargo fmt --check
  • cargo xtask lib-test --crates migtd
  • TLS and SPDM skip-RA EMU smoke tests
  • SPDM rebind skip-RA test

@haitaohuang
haitaohuang force-pushed the fix/spdm-cancellation-cleanup branch 2 times, most recently from 9eb1889 to 9bca13d Compare October 27, 2026 20:13
@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status note: the current failed checks are infrastructure failures, not patch failures.

  • Clippy: runner disconnected during Checkout sources; Clippy did not run.
  • CoRIM with Direct Signer Anchor and Certificate Rotation: runner disconnected during Checkout sources.
  • Policy v2 All Three Chains Rotation (Mock Report): runner disconnected during Checkout sources.

No lint, compilation, or test failure has been observed. The remaining checks are still progressing.

@haitaohuang
haitaohuang force-pushed the fix/spdm-cancellation-cleanup branch from 9bca13d to 0e85fcf Compare October 28, 2026 04:56
@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update for the fresh run: two jobs lost hosted-runner communication during Checkout sources:

  • Build (virtio-serial / v1 / spdm / release)
  • Policy v2 Key Rotation with IGVM Attest

Neither reached build or test execution; both are infrastructure failures. One check remains running.

@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update: the final failed job, Build (vmcall-raw / v1 / tls / debug), also lost hosted-runner communication during Checkout sources. This attempt completed 60 checks successfully; none of the three failed jobs reached compilation or tests.

@haitaohuang
haitaohuang force-pushed the fix/spdm-cancellation-cleanup branch from 0e85fcf to 16e3ca4 Compare October 28, 2026 08:26
@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update for the fresh run: Build Library Crates exceeded its 30-minute job limit while still in Checkout sources. No library build or test command ran, so this is an infrastructure failure.

@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update: SPDM Migration (Skip RA) exceeded its one-hour job limit while still in Checkout sources. The migration test did not run, so this is another infrastructure failure.

@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update: Policy v2 with Mock Report and IGVM Attest also exceeded one hour in Checkout sources. Policy generation and the integration test never ran, so this is another infrastructure failure.

@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update: Build (virtio-serial / v1 / spdm / debug) failed after one hour in Checkout sources. The build step never ran, so this is another infrastructure failure. Seven checks remain active.

Hold a cleanup guard across migration and rebind SPDM exchanges so timeout or cancellation wipes encoded application-context keys and retires every exchange-owned session, including sessions whose last handshake identifier was already cleared after FINISH.

Keep cleanup idempotent, preserve the primary protocol error when shutdown fails, and cover requester and responder success, failure, cancellation, and repeated cleanup.

Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Assisted-by: GitHub Copilot CLI:GPT-5.6 Sol
@haitaohuang
haitaohuang force-pushed the fix/spdm-cancellation-cleanup branch from 16e3ca4 to 08e07ad Compare October 28, 2026 12:21
@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update: the final job, Build (virtio-serial / v1 / tls / debug), also failed during Checkout sources; compilation never began. The completed attempt had 58 successful checks and five infrastructure-only non-success jobs, so I retriggered CI with an unchanged-tree commit metadata refresh.

@haitaohuang

Copy link
Copy Markdown
Contributor Author

CI status update: SPDM Policy v2 with Mock Report failed during Checkout sources. SPDM policy setup and the integration test never ran, so this is an infrastructure failure. Six checks remain active.

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.

2 participants