Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid ErrorCode in handshake in the clear #2867

Open
lazineer opened this issue Oct 23, 2024 · 4 comments
Open

Invalid ErrorCode in handshake in the clear #2867

lazineer opened this issue Oct 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lazineer
Copy link

No session required in hanshake in the clear.
But it returns SessionRequired if the requester sends FINISH in session in handshake in the clear.
I think InvalidRequest or UnexpectedRequest would be appropriate.

/* handshake in clear, then it must not be in a session.*/
if (spdm_context->last_spdm_request_session_id_valid) {
if (libspdm_get_connection_version(spdm_context) >= SPDM_MESSAGE_VERSION_12) {
return libspdm_generate_error_response(
spdm_context, SPDM_ERROR_CODE_SESSION_REQUIRED, 0, response_size, response);

@steven-bellock steven-bellock added the bug Something isn't working label Oct 23, 2024
@steven-bellock
Copy link
Contributor

I guess one of the questions is why is libspdm decrypting anything at all if the session state is still in the handshake phase and HANDSHAKE_IN_THE_CLEAR_CAP is set for both endpoints.

@steven-bellock
Copy link
Contributor

And going even further why do the Request-direction and Responder-direction handshake secrets even exist if HANDSHAKE_IN_THE_CLEAR_CAP is set for both endpoints? Filed https://github.com/DMTF/SPDM-WG/issues/3684 to make that more explicit in the specification.

@jyao1
Copy link
Member

jyao1 commented Oct 23, 2024

agree it is a bug

@steven-bellock
Copy link
Contributor

@steven-bellock to file an issue on (lack of) handshake secret derivation when HANDSHAKE_IN_THE_CLEAR_CAP is set for both endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants