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

Safe default /dev mounts? #202

Open
dseomn opened this issue Sep 8, 2022 · 3 comments
Open

Safe default /dev mounts? #202

dseomn opened this issue Sep 8, 2022 · 3 comments

Comments

@dseomn
Copy link
Member

dseomn commented Sep 8, 2022

Hi,

Would it be possible for nsjail to either mount some of /dev by default, or add a flag to do that? I see mentions of /dev/urandom and /dev/null in the README, but there are also /dev/zero, /dev/stdin, and a handful of other things in dev that seem like they would be safe and useful to bind-mount by default.

@dseomn
Copy link
Member Author

dseomn commented Sep 8, 2022

Somebody just pointed me at https://github.com/opencontainers/runc/blob/main/libcontainer/SPEC.md#filesystem which looks like a good list of which device files should be bind-mounted.

@disconnect3d
Copy link
Contributor

disconnect3d commented Feb 21, 2023

Hi, you can mount all those things with bind mounts, so the question is if there is really a needeat all to have a flag for default devices.

On the other hand, a flag could make it so that the devices would be mknod-ed instead of bind mounted. But I am not sure if that is really a difference.

@dseomn
Copy link
Member Author

dseomn commented Feb 27, 2023

I think the main benefit would be saving people from the effort of looking up that list of common device files, since it seems like a pretty normal thing to want all of those devices.

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

2 participants