Skip to content

measurements: validate slot_id in GET_MEASUREMENTS request - #9

Merged
wmaroneAMD merged 1 commit into
OpenPRoT:mainfrom
bluerise:spdm-valid-meas
Oct 23, 2026
Merged

wmaroneAMD merged 1 commit into
OpenPRoT:mainfrom
bluerise:spdm-valid-meas

Conversation

@bluerise

Copy link
Copy Markdown
Contributor

When SignatureRequested is set in GET_MEASUREMENTS, DMTF DSP0274 requires the responder to validate SlotIDParam. If the slot_id is invalid, out of range, or not provisioned (or if multi-key negotiation is enabled and the key does not support measurement signing), the responder must return an ERROR response with ErrorCode::InvalidRequest. Previously, unprovisioned slots caused sign_hash to fail internally without generating an SPDM ERROR response, causing the requester to hang indefinitely on socket read in DMTF conformance test case 7.4.

Changes:

  • Validate that slot_id is within range and provisioned in device_certs_store.
  • Check that key_usage_mask supports measurement signing when multi-key negotiation is active for SPDM 1.3+.
  • Return ErrorCode::InvalidRequest upfront so an SPDM ERROR response is properly sent.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: bluerise / name: Patrick Wildt (a3dfa92)

When SignatureRequested is set in GET_MEASUREMENTS, DMTF DSP0274 requires
the responder to validate SlotIDParam. If the slot_id is invalid, out of
range, or not provisioned (or if multi-key negotiation is enabled and the
key does not support measurement signing), the responder must return an
ERROR response with ErrorCode::InvalidRequest. Previously, unprovisioned
slots caused sign_hash to fail internally without generating an SPDM
ERROR response, causing the requester to hang indefinitely on socket read
in DMTF conformance test case 7.4.

Changes:
- Validate that slot_id is within range and provisioned in
  device_certs_store.
- Check that key_usage_mask supports measurement signing when multi-key
  negotiation is active for SPDM 1.3+.
- Return ErrorCode::InvalidRequest upfront so an SPDM ERROR response is
  properly sent.
@wmaroneAMD
wmaroneAMD merged commit 4633905 into OpenPRoT:main Oct 23, 2026
12 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