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

[PAL] Validate entrypoint ELF file separately #1820

Merged
merged 1 commit into from
Jul 24, 2024

Commits on Jul 24, 2024

  1. [PAL] Validate entrypoint ELF file separately

    Previously, the entrypoint ELF file (`loader.entrypoint` in manifest)
    contents were validated during file read and file mmap, just like with
    all other files. In particular, Linux-SGX PAL expects the entrypoint to
    be marked as `sgx.trusted_files` and validates its SHA256 hash during
    file read/mmap.
    
    However, future commits will move handling of `sgx.trusted_files` to the
    LibOS layer. Thus, file read/mmap at the PAL layer will lose validation
    guarantees. This commit introduces a separate `loader.entrypoint.sha256`
    manifest option and a corresponding logic to validate the (only
    required) entrypoint file. A new assumption is made now, that the only
    file to be loaded by PAL (and not by LibOS) is this entrypoint file;
    this assumption can be made because the entrypoint has no dependencies.
    
    As a side effect, `loader.entrypoint` (which was previously a URI of the
    entrypoint file) is renamed to `loader.entrypoint.uri`. Additionally,
    all Gramine tests either remove `loader.entrypoint` (and corresponding
    `sgx.trusted_files`) or rename it to explicit `loader.entrypoint.uri`.
    
    Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
    dimakuv committed Jul 24, 2024
    Configuration menu
    Copy the full SHA
    72668bb View commit details
    Browse the repository at this point in the history