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

Support additional isolation features #12

Open
nbraud opened this issue Dec 1, 2018 · 3 comments
Open

Support additional isolation features #12

nbraud opened this issue Dec 1, 2018 · 3 comments

Comments

@nbraud
Copy link

nbraud commented Dec 1, 2018

Would you consider PRs that add support for Linux sandboxing features that are complementary to namespaces, such as MAC (via AppArmor, for example) and seccomp filters?

This would enable using unshare to build safe(r) sandboxes, by limiting the exposed attack surface on the rest of the system, esp. the kernel.

@tailhook
Copy link
Owner

tailhook commented Dec 1, 2018

Probably yes, if this either requires complex initialization in child process before exec, or has complex interactions between current features and MAC (I'm not familiar with how MACs work). We may put it under a feature gate if it requires new dependencies, though.

Integrating seccomp is on my to do list, but I'm not going to do it soon. So yes, contributions are welcome.

@pwFoo
Copy link

pwFoo commented Mar 28, 2020

I play with / build a minimal container runtime host without featues like AppAmor or SELinux.
At the moment I use crun / runc as runtime.
Also played a little bit with busybox unshare, but it was possible to break out of the namespaced environment?

Is there a security feature implemented to prevent access to /sys and /proc from inside of a container created with your unshare?

@tailhook
Copy link
Owner

tailhook commented Aug 5, 2020

Is there a security feature implemented to prevent access to /sys and /proc from inside of a container created with your unshare?

Not exactly. But you can either change the user or change the user and create a user namespace (to become root in a new namespace) or you can use libmount (or any other mount sycall wrapper) to hide/configure these directories.

Sorry for late reply.

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

3 participants