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

imp: create clean environment for job shell #107

Open
grondo opened this issue Mar 11, 2020 · 0 comments
Open

imp: create clean environment for job shell #107

grondo opened this issue Mar 11, 2020 · 0 comments

Comments

@grondo
Copy link
Contributor

grondo commented Mar 11, 2020

The IMP is executed directly by the instance and therefore inherits the environment of the executing broker, modulo any environment variables stripped by the kernel if the IMP is setuid.

This is ok for the IMP since we are careful to run minimal code under privilege, and if installed setuid the kernel will clean LD_LIBRARY_PATH and LD_PRELOAD for us.

However, we may want to do a similar service for the job shell and start it with a clean environment, if possible. We may want to copy sudoers and have a whitelist/blacklist for environment variables in the config.

It may be impossible to fully protect the job shell environment. E.g. we'll need to allow LD_LIBRARY_PATH to be passed through if the version of Flux was side installed, and if so then the instance could cause the job shell running as a different user to execute arbitrary code. Since there is implicit "trust" between a guest and an instance owner, maybe this all a bit too paranoid.

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

1 participant