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

AlgSupported checks reserved bits #2950

Open
steven-bellock opened this issue Jan 12, 2025 · 2 comments
Open

AlgSupported checks reserved bits #2950

steven-bellock opened this issue Jan 12, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@steven-bellock
Copy link
Contributor

For example

case SPDM_NEGOTIATE_ALGORITHMS_STRUCT_TABLE_ALG_TYPE_DHE:
if (struct_table->alg_supported == 0) {
return libspdm_generate_error_response(
spdm_context, SPDM_ERROR_CODE_INVALID_REQUEST,
0, response_size, response);
}

where DHE only uses seven bits. A mask needs to be applied so that reserved bits are not checked.

@steven-bellock steven-bellock added the bug Something isn't working label Jan 12, 2025
@steven-bellock steven-bellock self-assigned this Jan 13, 2025
@steven-bellock
Copy link
Contributor Author

This looks like it's needed in lots of other algorithms. This issue will focus on the AlgType ones.

steven-bellock added a commit to steven-bellock/libspdm that referenced this issue Jan 13, 2025
steven-bellock added a commit to steven-bellock/libspdm that referenced this issue Jan 13, 2025
@steven-bellock
Copy link
Contributor Author

I will make a pull request to just introduce helper functions that return masks based on the negotiated SPDM version.

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.

1 participant