fix(migtd/spdm): make session failures atomic - #1028
Open
haitaohuang wants to merge 3 commits into
Open
Conversation
Evaluate the responder message result before treating a removed session as a successful END_SESSION. This preserves VDM and policy failures when the handler tears down the session. Signed-off-by: Haitao Huang <haitaohuang@microsoft.com> Assisted-by: GitHub Copilot CLI:GPT-5.6-Sol [migtd-review]
Invalidate requester and responder sessions on every failure after key exchange, including timeout and transport-finalization paths. Always attempt transport shutdown while preserving the primary protocol error. Assisted-by: GitHub Copilot CLI:GPT-5.6-Sol [migtd-review] Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Stage peer migration information during the SPDM VDM exchange and commit the negotiated version, MSK, and approved SERVTD_EXT hash only after END_SESSION and transport shutdown complete successfully. Preserve one-shot responder handling so a replay cannot replace staged state. Assisted-by: GitHub Copilot CLI:GPT-5.6-Sol [migtd-review] Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
Contributor
|
It's a rather big change, I'll review next week |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Harden SPDM migration and rebind failure atomicity across three ordered commits:
END_SESSION.END_SESSIONand transport shutdown. Responder exchange remains one-shot so replay cannot replace staged state.The change preserves the existing quote and TDREPORT binding paths and does not import policy-series refactors, one-hash/CoRIM/RTMR1 changes, test bypasses, or diagnostic logging.
Validation
bash sh_script/preparation.shcargo fmt --checkcargo checkcargo test -p migtd --lib(23 passed)main,stack-guard,vmcall-raw,spdm_attestation,policy_v2)stack-guard,virtio-vsock,virtio-serial,vmcall-interrupt)cargo deny check advisories,sources, andbanscargo xtask lib-buildandcargo xtask lib-testintegration-emu.ymlscenarios, run sequentially