logoalt Hacker News

TheRealPomaxlast Wednesday at 9:54 PM1 replyview on HN

Docker containers with root have rootish rights on the host machine too because the userid will just be 0 for both. So if you have, say, a bind mount that you play fast and loose with, the docker user can create 0777 files outside the docker container, and now we're almost done. Even worse if "just to make it work" someone runs the container with --privileged and then makes the terminal mistake of exposing that container to the internet.


Replies

V__last Wednesday at 10:01 PM

Can you explain this a bit further? Wouldn't that 0777 file outside docker be still executed inside the container and not on the host?

show 1 reply