Skip to content

[issue-3597] Add explicit SPDM_MAX_OPAQUE_DATA_SIZE check in responder FINISH and PSK_FINISH parsers#3657

Open
czwolak wants to merge 1 commit into
DMTF:mainfrom
czwolak:issue-3597-responder-opaque-max-bound-check
Open

[issue-3597] Add explicit SPDM_MAX_OPAQUE_DATA_SIZE check in responder FINISH and PSK_FINISH parsers#3657
czwolak wants to merge 1 commit into
DMTF:mainfrom
czwolak:issue-3597-responder-opaque-max-bound-check

Conversation

@czwolak

@czwolak czwolak commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #3597

Mirror the explicit opaque-length max-bound check that already exists in the requester-side parsers to the corresponding responder-side parsers.

Existing pattern (requester side):

  • libspdm_req_finish.c line 600: if (opaque_data_size > SPDM_MAX_OPAQUE_DATA_SIZE) → reject
  • libspdm_req_psk_finish.c line 292: same check

Added (responder side):

  • libspdm_rsp_finish_rsp.c: add if (req_opaque_data_size > SPDM_MAX_OPAQUE_DATA_SIZE) before the size-consistency check
  • libspdm_rsp_psk_finish_rsp.c: same check

Both reject with SPDM_ERROR_CODE_INVALID_REQUEST, consistent with the existing error-response pattern in those functions.

This makes opaque-length validation symmetric across all four FINISH/PSK_FINISH request and response parsing paths.

Signed-off-by: Cezary Zwolak cezary.zwolak@intel.com

…r FINISH and PSK_FINISH parsers

Mirror the explicit opaque-length max-bound check already present in the
requester-side parsers (libspdm_req_finish.c and libspdm_req_psk_finish.c) to
the corresponding responder-side parsers. Reject requests where
req_opaque_data_size > SPDM_MAX_OPAQUE_DATA_SIZE with INVALID_REQUEST before
the downstream size-consistency check, making validation symmetric across all
four paths.

Signed-off-by: Cezary Zwolak <cezary.zwolak@intel.com>
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.

PSK_FINISH/PSK_FINISH_RSP Missing Explicit Responder Max-Bound Check for SPDM 1.4 Request Opaque Length

2 participants