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

[SPDM 1.3] The SlotID fields shall not specify this certificate slot when the corresponding Key Usage is not set. #2495

Closed
Zhiqiang520 opened this issue Dec 27, 2023 · 2 comments · Fixed by #2520
Assignees
Labels
bug Something isn't working

Comments

@Zhiqiang520
Copy link
Contributor

The SlotID fields shall not specify this certificate slot when the corresponding MULTI_KEY_CONN_REQ or MULTI_KEY_CONN_RSP is true and the corresponding Key Usage is not set, for CHALLENGE, MEASUREMENTS, KEY_EXCHANGE and so on.

  1. Refer to the paragraph 373 Table 37 — Key usage bit mask In DSP0274_1.3.0.pdf.
    image

  2. For example, slot_id received from CHALLENGE request message at line 94 was directly set to auth_attribute without checking its corresponding Key Usage at line 141.

    slot_id = spdm_request->header.param1;

    spdm_response->header.spdm_version = spdm_request->header.spdm_version;
    spdm_response->header.request_response_code = SPDM_CHALLENGE_AUTH;
    auth_attribute = (uint8_t)(slot_id & 0xF);

@jyao1 jyao1 self-assigned this Jan 1, 2024
@jyao1
Copy link
Member

jyao1 commented Jan 2, 2024

@Zhiqiang520 please create a test for that.

@jyao1 jyao1 assigned Zhiqiang520 and unassigned jyao1 Jan 2, 2024
@Zhiqiang520
Copy link
Contributor Author

@jyao1 We have created test cases to catch this issue.
#2518

@jyao1 jyao1 assigned jyao1 and unassigned Zhiqiang520 Jan 12, 2024
@jyao1 jyao1 added the bug Something isn't working label Jan 12, 2024
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

Successfully merging a pull request may close this issue.

2 participants