-
Notifications
You must be signed in to change notification settings - Fork 156
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
Removed --privileged Flag from Docker Container Run #1008
Conversation
@original-brownbear Let me find a reviewer for this pull request, thanks for submitting it |
@yegor256 the pull request is rather small, pls review it |
@rultor try to merge |
@yegor256 the Docker daemon is stuck here, I think you need to restart it manually. |
@original-brownbear @yegor256 Oops, I failed. You can see the full log here (spent 2hr)
|
@rultor try to merge |
@rultor deploy pls |
@alex-palevsky OK, I'll try to deploy now. You can check the progress here |
@alex-palevsky Done! FYI, the full log is here (took me 8min) |
@original-brownbear everything still works fine :) we're good. thanks! |
@original-brownbear current problem with Docker is caused by this change. I have no idea why/how it worked before, but now I have to use |
@yegor256 you do remember my email from like January though right? ;) If you need privileged maybe you just need to turn off SeLinux (I think the old server was on CentOs right?)? |
@original-brownbear yes, the old server is on CentOS. that's why emails suck :) let's stay away from them and use only GitHub. no, I don't remember... what was it about? |
@yegor256 security ;) But now I see the same is explained in less detail on explicit actions to take :P in the PR description. |
@original-brownbear maybe it would be good to add an extra check into Rultor, to verify that this SeLinux is actually turned OFF. To prevent this from happening in the future.. |
@yegor256 not so sure about that, I mean that's a long way from Rultor should be able to work on any ssh host :) All these issues are coming from the single point of us using Docker in a slightly dirty way with the mounting of a host volume to run the build inside. |
This removes the use of the
--privileged
flag from the script starting the Docker run.Reason
The privileged flag creates a significant security issue for Rultor as it causes the host machine's devices to be fully accessible to the container run.
An attacker could take advantage of this fact and provide an image/script combination to Rultor that mounts the host's hard drive(s) (now available as a standard /dev/... ) into the container.
Combined with the fact that the Docker daemon does run under the root user, an attacker can trivially gain full control of the host via a privileged container.