Skip to content

fix(migtd): reject zero-progress pre-session writes - #1031

Merged
sgrams merged 1 commit into
intel:mainfrom
haitaohuang:fix/zero-progress-writes
Sep 4, 2026
Merged

fix(migtd): reject zero-progress pre-session writes#1031
sgrams merged 1 commit into
intel:mainfrom
haitaohuang:fix/zero-progress-writes

Conversation

@haitaohuang

Copy link
Copy Markdown
Contributor

Rationale

send_pre_session_data retries until the full buffer is written, but an AsyncWrite implementation may return Ok(0) without making progress. Treat that result as a logged MigrationResult::NetworkError so the migration pre-session path cannot spin indefinitely.

This matches the fail-closed behavior already used by the SPDM exact-I/O path in #1022.

Validation

  • cargo fmt --check
  • Full non-EMU CI gauntlet: preparation, format/check/Clippy, deny, library, and all 32 main image builds
  • Current Intel integration-emu.yml matrix, all 14 scenarios run sequentially:
    • Build and Test (Skip RA)
    • Policy v2 with Mock Report
    • Policy v2 with Mock Report and IGVM Attest
    • Rebind Prepare (Skip RA)
    • Rebind Prepare (Mock Report)
    • SPDM Migration (Skip RA)
    • SPDM Policy v2 with Mock Report
    • SPDM Rebind Prepare (Skip RA)
    • Mock Quote Retry, including retry-log assertions
    • Policy v2 Key Rotation (Mock Report)
    • Policy v2 Key Rotation with IGVM Attest
    • SPDM Policy v2 Key Rotation (Mock Report)
    • Policy v2 Policy + TCB Mapping Leaf Rotation (Mock Report)
    • Policy v2 All Three Chains Rotation (Mock Report)

Treat a successful zero-length pre-session transport write as a network error so the exact-write loop cannot spin indefinitely.

Assisted-by: GitHub Copilot CLI:GPT-5.6-Sol
Signed-off-by: Haitao Huang <haitaohuang@microsoft.com>
@sgrams
sgrams merged commit 15dbf4d into intel:main Sep 4, 2026
61 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.

2 participants