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

This should be stated that this is very dangerous. #8

Open
rhatdan opened this issue Sep 27, 2021 · 3 comments
Open

This should be stated that this is very dangerous. #8

rhatdan opened this issue Sep 27, 2021 · 3 comments

Comments

@rhatdan
Copy link

rhatdan commented Sep 27, 2021

If a container process gains access to this socket or the podman socket then it has full control on the system. IE Full root.
Basically the container process does a

docker run --ti --privileged fedora sh and it has a full root running process on the system, and only needs to escape mount namespace.

@rhatdan
Copy link
Author

rhatdan commented Sep 27, 2021

This opens this access to all containers. If access to the docker.socket is needed within a container on an SELinux system, SELinux separation should get disabled.

docker run --security-opt label=disabled
podman run --security-opt label=disabled

Then only the container running with the docker.sock or Podman.sock gains the dangerous access.

@apinter
Copy link

apinter commented Jan 10, 2022

I avoid using Docker as much as possible, unfortunately there are few exceptions where I have to run it and what @rhatdan is stating is absolutely crucial to understand and this policy should not be used in prod or on any public instance. Also, switching to podman solves a lot of issues.

@djtango
Copy link

djtango commented Dec 14, 2022

This opens this access to all containers. If access to the docker.socket is needed within a container on an SELinux system, SELinux separation should get disabled.

docker run --security-opt label=disabled podman run --security-opt label=disabled

Then only the container running with the docker.sock or Podman.sock gains the dangerous access.

Thank you this flag is what I was looking for so I didn't need to install this entire plugin

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