Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Provide a way to pass verified argv and environments #508

Closed
HW42 opened this issue Mar 11, 2019 · 4 comments · Fixed by #1667
Closed

Provide a way to pass verified argv and environments #508

HW42 opened this issue Mar 11, 2019 · 4 comments · Fixed by #1667
Assignees

Comments

@HW42
Copy link
Contributor

HW42 commented Mar 11, 2019

Currently the process arguments and environment variables are passed from pal_loader without any verification.

There should be a way to specify those in the manifest such that those are measured and can be trusted. This is particular useful for running (mostly) unmodified applications inside the enclave.

@mkow
Copy link
Member

mkow commented Mar 11, 2019

We have a fix for this in Graphene-ng, but it requires protected files to make sense (it adds an option to manifest to load argv from a file, which can be mounted as protected). We could also add third option: specify argv in the manifest itself, but this would require a lot of changes in manifest parsing to allow providing arbitrary argv and doesn't allow to provide the arguments in runtime (instead of build-time).

We could merge what we have as is, because it doesn't depend on protected files per se, but it would only start to be useful after also merging filesystem protection. Any thoughts?

@dimakuv
Copy link
Contributor

dimakuv commented Mar 12, 2019

I suggest you submit a PR with your solution, and protected-files feature in another PR in the future. At least we'll have a better understanding how your solution works.

We are talking only about argv or envvars are also handled by this mechanism?

Is it possible to pass argv in a special envvar which will be protected somehow? (To avoid the dependency on protected-files.)

@mkow
Copy link
Member

mkow commented Mar 13, 2019

I suggest you submit a PR with your solution, and protected-files feature in another PR in the future. At least we'll have a better understanding how your solution works.

Ok, I'll wait a bit more to give everyone a chance to reply on this and prepare the PR afterwards.

We are talking only about argv or envvars are also handled by this mechanism?

We used this only for argv, but adding the same thing for env sounds trivial, the code should be almost identical (and I plan to include both in the PR).

Is it possible to pass argv in a special envvar which will be protected somehow? (To avoid the dependency on protected-files.)

Isn't protecting envs exactly as hard as protecting argv?

@dimakuv
Copy link
Contributor

dimakuv commented Mar 14, 2019

Isn't protecting envs exactly as hard as protecting argv?

Then ignore my question :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants