gramineproject / graphene

Graphene / Graphene-SGX - a library OS for Linux multi-process applications, with Intel SGX support
https://grapheneproject.io
GNU Lesser General Public License v3.0
771 stars 260 forks source link

[Pal/Linux-SGX] Restrict Untrusted RSP to point outside the enclave #2546

Closed dimakuv closed 3 years ago

dimakuv commented 3 years ago

Description of the changes

Untrusted RSP value (SSA[0].ursp) is not sanitized by the SGX hardware upon EENTER/ERESUME and may be controlled by the attacker. To prevent any possibility of tampering with this value, we simply disallow it to point inside the SGX enclave.

How to test this PR?

All tests must pass.


This change is Reviewable