Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm willing to believe that Linux containers were not initially designed to be a security boundary, but I struggle to see why that means they aren't now; it's been over a decade and they have an awful lot of security features for something that doesn't care about security.

EDIT: For that matter, they're clearly being used for security; the features in Linux that are used by runc et al. are the same features used by eg. Chrome to isolate components in order to contain vulnerabilities.



As far as I know, Docker still punches through your firewall by default. I consider that a pretty big negative against assuming secure-by-design.


What attack are you envisioning that is aided by docker bypassing firewall rules?


Weak password + Open ports ---> Malware attack ( kinsing , etc )

so use "-p 127.0.0.1:5432:5432"

- https://github.com/docker-library/postgres/issues/770

- https://sysdig.com/blog/zoom-into-kinsing-kdevtmpfsi

- https://sysdig.com/blog/cloud-defense-in-depth/

- https://thenewstack.io/kinsing-malware-targets-kubernetes/

- https://stackoverflow.com/search?q=kinsing

- https://github.com/search?q=repo%3Adocker-library%2Fpostgres...

-----------

https://docs.docker.com/network/packet-filtering-firewalls/

"On Linux, Docker manipulates iptables rules to provide network isolation. While this is an implementation detail and you should not modify the rules Docker inserts into your iptables policies, it does have some implications on what you need to do if you want to have your own policies in addition to those managed by Docker.

If you're running Docker on a host that is exposed to the Internet, you will probably want to have iptables policies in place that prevent unauthorized access to containers or other services running on your host. This page describes how to achieve that, and what caveats you need to be aware of."


I mean, there was this story[0] ("How a Docker footgun led to a vandal deleting NewsBlur's MongoDB database") about how the Docker rules allowed a hacker to delete someone's database.

>Turns out the ufw firewall I enabled and diligently kept on a strict allowlist with only my internal servers didn’t work on a new server because of Docker. When I containerized MongoDB, Docker helpfully inserted an allow rule into iptables, opening up MongoDB to the world. So while my firewall was “active”, doing a sudo iptables -L | grep 27017 showed that MongoDB was open the world. This has been a Docker footgun since 2014.

Story was previously discussed on HN[1]. Sure, you could argue the author should have done more to secure the endpoint, but this was 100% a failure mode due to how Docker prioritizes convenience over security.

[0] https://blog.newsblur.com/2021/06/28/story-of-a-hacking/

[1] https://news.ycombinator.com/item?id=27670058


Most containers do not switch the CPU VM context when the CPU switches between containers. VMs do. This is necessary to prevent attacks which can leak data through the CPU cache.


I agree that they have a bunch of security features, because they've been playing security whack-a-mole for a decade. Retrofitting a security boundary onto an existing system is very difficult. Personally Linux containers are still not at a level where I'd trust them for something that was meant to be a hard security boundary rather than a damage mitigation exercise, though obviously that's a subjective judgement.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: