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

SGX attestation verification #195

Closed
g2flyer opened this issue May 2, 2019 · 7 comments
Closed

SGX attestation verification #195

g2flyer opened this issue May 2, 2019 · 7 comments
Assignees

Comments

@g2flyer
Copy link
Contributor

g2flyer commented May 2, 2019

We are not verifying - in pservice during secret provisioning and in eservice during enclave registration - all report fields for attestations, in particular we are not looking at the debug flag and (less crucially) the mode bit which has security implications:

  • An enclave with the debug flag (SGX_FLAGS_DEBUG / 0x0000000000000002ULL in the report's attribute) turned on would enable an adversarial host of an enclave to see all enclave data and change it's behavior. So in secure mode a verification of the attestation, e.g., at enclave registration, should ensure this bit is 0.
  • The mode flag (SGX_FLAGS_MODE64BIT / 0x0000000000000004ULL in the report's attribute) determines whether the enclave runs in 32-bit and 64-bit mode, correspondingly changing the semantics of a given measurement (MR_ENCLAVE). While tricky to achieve, it could be in theory to have code which runs in both 32-bit and 64-bit mode but exhibits completely different (and potentially adversarial) behavior. Hence to be on the safe side and as our code always is supposed to run only in 64-bit mode we should ensure that this flag is 1.
@cmickeyb cmickeyb added enhancement New feature or request bug Something isn't working and removed enhancement New feature or request labels May 6, 2019
@marcelamelara
Copy link
Member

@cmickeyb @bvavala Is this issue still valid? Might be convenient to address while we're adding DCAP verification.

@bvavala
Copy link
Member

bvavala commented Feb 3, 2023

Yes, and I agree. This must probably happen both in the pservice and pdo-tp.

@prakashngit
Copy link
Contributor

Changing this to an enhancement. Currently PDO TP encodes a specific "policy" while verifying attestation reports. The ask seems to be make the policy more robust (such as checking more of the fields of the attestation report, or etc.). @bvavala @g2flyer Could I please request to add details about what other fields on the attestation report make sense to be verified in the context of PDO?

@prakashngit prakashngit added enhancement New feature or request and removed bug Something isn't working labels Apr 23, 2024
@prakashngit
Copy link
Contributor

If I understand, the concern is that the PDO TP does not currently check whether the enclave runs in SGX DEBUG mode or production mode. For protecting confidential data, it is expected to run SGX in production mode. We will assume that this is an enhancement to PDO to be supported by a future commit. This is consistent with our current assumptions that PDO is not meant for production use.

@prakashngit prakashngit self-assigned this Apr 30, 2024
@prakashngit
Copy link
Contributor

@g2flyer @bvavala Please comment if you are OK with the comments above as a temporary resolution to the issue.

@prakashngit prakashngit removed the enhancement New feature or request label Apr 30, 2024
@g2flyer
Copy link
Contributor Author

g2flyer commented Apr 30, 2024

I'm definitely fine with tabling the issue. Calling fixing a security project to ensure that it runs in secure mode an enhancement seems to me pretty euphemistic, so glad we removed the enhancement tag.

prakashngit added a commit to prakashngit/private-data-objects that referenced this issue Apr 30, 2024
…tion verification report

is checked. Adding notes about the fact that currently we do not check whether the enclave runs
in SGX debug mode or not. The corresponding issue can be found at hyperledger-labs#195

Signed-off-by: Prakash Narayana Moorthy <[email protected]>
prakashngit added a commit to prakashngit/private-data-objects that referenced this issue Apr 30, 2024
…tion verification report

is checked. Adding notes about the fact that currently we do not check whether the enclave runs
in SGX debug mode or not. The corresponding issue can be found at hyperledger-labs#195

Signed-off-by: Prakash Narayana Moorthy <[email protected]>
bvavala pushed a commit that referenced this issue Apr 30, 2024
…tion verification report

is checked. Adding notes about the fact that currently we do not check whether the enclave runs
in SGX debug mode or not. The corresponding issue can be found at #195

Signed-off-by: Prakash Narayana Moorthy <[email protected]>
@bvavala
Copy link
Member

bvavala commented Jun 10, 2024

@g2flyer I believe #490 addresses the concerns here. Can we close this?

@g2flyer g2flyer closed this as completed Jun 11, 2024
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

No branches or pull requests

5 participants