intel / intel/confidential-computing.sgx.sdk

Unable to specify SGX_KEYPOLICY_NOISVPRODID for sgx_get_key

Open
#63 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

`sgx_get_key` returns `SGX_ERROR_INVALID_PARAMETER` if the `SGX_KEYPOLICY_NOISVPRODID` bit is set in the `key_policy` field.

From looking at the code it seems to me the bug is in this line: https://github.com/intel/linux-sgx/blob/4589daddd58bec7367a6a9de3fe301e6de17671a/sdk/selib/sgx_get_key.cpp#L93

`SGX_KEYPOLICY_NOISVPRODID` is missing in the check and so it's treated as a reserved bit.

Incidentally, `sgx_seal_data_ex` does include `SGX_KEYPOLICY_NOISVPRODID` in its check: https://github.com/intel/linux-sgx/blob/4589daddd58bec7367a6a9de3fe301e6de17671a/sdk/tseal/tSeal.cpp#L96

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.