linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Chmielewski <tch@virtall.com>
To: linux-btrfs@vger.kernel.org
Cc: tobias.hunger@gmail.com
Subject: Re: btrfs and containers
Date: Fri, 11 Mar 2016 12:55:20 +0900	[thread overview]
Message-ID: <4d5d1ffec6db0dc343b0d143172bcbd6@admin.virtall.com> (raw)

> I have been running systemd-nspawn containers on top of a btrfs
> filesystem for a while now.
> 
> This works great: Snapshots are a huge help to manage containers!
> 
> But today I ran btrfs subvol list . *inside* a container. To my
> surprise I got a list of *all* subvolumes on that drive. That is
> basically a complete list of containers running on the machine. I do
> not want to have that kind of information exposed to my containers.

You seem to be running a privileged container, i.e. container's root is 
the same UID as host root. This is typically undesired and means that 
your containers have full access to data on host and on other 
containers.

For the record, with a privileged container you can not only list the 
subvolumes, but also list disk data (i.e. dd if=/dev/sda) or even 
destroy that data (dd if=/dev/zero of = / dev / sda).

So, think twice if the container setup you have is what you want!

LXD is particularly easy to run unprivileged containers: 
https://linuxcontainers.org/ (starts containers as unprivileged by 
default, and has lots of many goodies in general).


Tomasz Chmielewski
http://wpkg.org



             reply	other threads:[~2016-03-11  3:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11  3:55 Tomasz Chmielewski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-03-07 22:55 btrfs and containers Tobias Hunger
2016-03-07 23:45 ` Chris Murphy
2016-03-08 19:58   ` Liu Bo
2016-03-08 21:28     ` Chris Murphy
2016-03-09 12:15       ` Austin S. Hemmelgarn
2016-03-10  2:55         ` Duncan
2016-03-10 17:04           ` Austin S. Hemmelgarn
2016-03-10 19:35             ` Chris Murphy
2016-03-10 22:34               ` Liu Bo
2016-03-11  2:50               ` Duncan
2016-03-08 12:12 ` Austin S. Hemmelgarn
2016-03-09 21:10 ` Marc MERLIN
2016-03-09 21:21   ` Chris Murphy
2016-03-09 21:45     ` Marc MERLIN
2016-03-09 23:28       ` Rich Freeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d5d1ffec6db0dc343b0d143172bcbd6@admin.virtall.com \
    --to=tch@virtall.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=tobias.hunger@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).