TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Containers and Docker: how secure are they?

117 pointsby jpetazzoover 11 years ago

7 comments

contingenciesover 11 years ago
I support docker in its efforts. However, docker is too cute, too hyped, and too rapidly developed to trust with your security as yet. Quite frankly, you have to understand a bit more than how to call an API to have faith in your infrastructure&#x27;s inherent security.<p>For example, in this article the author links to the &#x27;list of dropped capabilities in the Docker code&#x27;. As it happens, I wrote that list quite some time ago, and wrote it for <i>lxc-gentoo</i>, a guest-generation script for raw LXC against an earlier kernel version with an earlier LXC userspace. Not only is the list now out of date, it&#x27;s no longer using the preferred approach. Why is this? Instead of explicit drop (&quot;allow all, deny some&quot;) after some months of raising the issue one of the LXC devs finally added the &#x27;lxc.keep&#x27; (ie. &quot;deny all, allow some&quot;) which is architecturally more secure against things like kernel upgrades which add or modify kernel capabilities.<p>Furthermore, the docker people only included this when I added <a href="https://github.com/dotcloud/docker/commits/v0.5.0/lxc_template.go?author=globalcitizen" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dotcloud&#x2F;docker&#x2F;commits&#x2F;v0.5.0&#x2F;lxc_templa...</a> ... things as important as <i>WARNING: procfs is a known attack vector and should probably be disabled if your userspace allows it. eg. see</i> <a href="http://blog.zx2c4.com/749" rel="nofollow">http:&#x2F;&#x2F;blog.zx2c4.com&#x2F;749</a> and <i>WARNING: sysfs is a known attack vector and should probably be disabled if your userspace allows it. eg. see</i> <a href="http://bit.ly/T9CkqJ" rel="nofollow">http:&#x2F;&#x2F;bit.ly&#x2F;T9CkqJ</a><p>Again, I fully support docker&#x27;s efforts but the article is ... misleading at best.
评论 #6252723 未加载
评论 #6252727 未加载
评论 #6253720 未加载
评论 #6252778 未加载
dapover 11 years ago
Good post, except that it&#x27;s extremely misleading to use Solaris as the canonical example of non-Linux containers and then say that non-Linux containers &quot;haven&#x27;t had as much exposure&quot; and &quot;the source code isn&#x27;t always available for peer review and auditing&quot;. Solaris containers (in Solaris first, and then illumos when Solaris became closed-source again) have been open source since 2005 and running in hostile production environments that whole time.
评论 #6253616 未加载
评论 #6252959 未加载
jpetazzoover 11 years ago
By the way, if anyone knows of a documented exploit for LXC, I would love to hear about it. People (generally advocating VMs, zones, jails, OpenVZ...) will often say that &quot;containers are not secure&quot;, but once you&#x27;ve taken some basic steps (like locking down kernel caps and device access) it becomes difficult to find an actual threat.
评论 #6252687 未加载
评论 #6253375 未加载
评论 #6252600 未加载
评论 #6255624 未加载
评论 #6252664 未加载
评论 #6252865 未加载
评论 #6255741 未加载
SkyMarshalover 11 years ago
<i>&gt;Finally, if you run Docker on a server, it is recommended to run exclusively Docker in the server, and move all other services within containers controlled by Docker.</i><p>This looks like what CoreOS is providing, a stripped down barebones host, with all other services not strictly necessary in the host moved to the containers.<p><i>&gt;Capabilities turn the binary “root&#x2F;non-root” dichotomy into a fine-grained access control system. Processes (like web servers) that just need to bind on a port below 1024 do not have to run as root: they can just be granted the net_bind_service capability instead. And there are many other capabilities, for almost all the specific areas where root privileges are usually needed.</i><p>This is awesome, has been a personal pain point in the past, trying to get JVM running as non-root in ubuntu server. Theoretically it&#x27;s easy with IPTABLEs, but in practice it can be tricky to get working exactly right.
评论 #6254665 未加载
pacalaover 11 years ago
Any 0-day Linux root vulnerability qualifies. Linux is a <i>large</i> system, do your own risk analysis.
评论 #6252491 未加载
AYBABTMEover 11 years ago
I&#x27;m very interested in all those things, but I clearly lack a trajectory for learning them. Is there a reference I could read or a &#x27;name&#x27; for that domain? How does one become educated on these things?<p>So far I&#x27;ve grabbed knowledge by reading paper on operating systems (and misunderstanding 80% of their content), reading man pages, reading Tanenbaum&#x27;s textbooks, etc. But still I don&#x27;t feel like I know or understand.<p>They say a lack of words for things render one blinds of their ignorance. Sometimes it&#x27;s also that you just don&#x27;t know what needs to be learnt.
gouggougover 11 years ago
&quot;No exploit has been crafted yet to demonstrate this, but it will certainly happen in the feature&quot;. But will it be considered a future? ;)