linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Graham Cobb <g.btrfs@cobb.uk.net>, linux-btrfs@vger.kernel.org
Subject: Re: Security implications of btrfs receive?
Date: Wed, 7 Sep 2016 13:33:24 -0400	[thread overview]
Message-ID: <6b29e923-4cef-cd78-cd98-d59419cc2341@gmail.com> (raw)
In-Reply-To: <f03940e1-cf4c-7354-97f4-8801ca4b4304@cobb.uk.net>

On 2016-09-07 12:10, Graham Cobb wrote:
> On 07/09/16 16:20, Austin S. Hemmelgarn wrote:
>> I should probably add to this that you shouldn't be accepting
>> send/receive data streams from untrusted sources anyway.  While it
>> probably won't crash your system, it's not intended for use as something
>> like a network service.  If you're sending a subvolume over an untrusted
>> network, you should be tunneling it through SSH or something similar,
>> and then using that to provide source verification and data integrity
>> guarantees, and if you can't trust the system's your running backups
>> for, then you have bigger issues to deal with.
>
> In my personal case I'm not talking about accepting streams from
> untrusted sources (although that is also a perfectly reasonable question
> to discuss).  My concern is if one of my (well managed and trusted but
> never perfect) systems is hacked, can the intruder use that as an entry
> to attack others of my systems?
Probably not directly.  They could get data from the other systems 
backups, but unless something's seriously broken, there should be no way 
for them to inject data into those backups.  IOW, it should be about the 
same level of security you would get from doing this with tar based 
backups with an individual user for each system and world readable files.
>
> In particular, I never trust my systems which live on the internet with
> automated access to my personal systems (without a human providing
> additional passwords/keys) although I do allow some automated accesses
> the other way around.  I am trying to determine if sharing
> btrfs-send-based backups would open a vulnerability.
As far as I can tell, the only vulnerability would be through 
information leaks.  In essence, this should in theory only be usable as 
a side-channel to obtain information to then use for a real attack 
(assuming of course that you have proper at-rest encryption for any 
sensitive data on your system).
>
> There are articles on the web suggesting that centralised
> btrfs-send-based backups are a good idea (using ssh access with separate
> keys for each system which automatically invoke btrfs-receive into a
> system-specific path).  My tests so far suggest that this may not be as
> secure as the articles imply.
While just doing that in general is not all that secure, if you make 
sure each system-specific path is on it's own filesystem (this can be 
done with thin provisioning if you are short on space), then that should 
eliminate most of the security issues.  If you're feeling really 
adventurous and don't entirely trust the stability of the code involved, 
you could instead force it to run a script which invokes btrfs-receive 
in a per-instance dedicated sandbox constrained to that filesystem.


  reply	other threads:[~2016-09-07 17:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-05  9:59 Security implications of btrfs receive? Graham Cobb
2016-09-05 14:33 ` Duncan
2016-09-06 12:15 ` Austin S. Hemmelgarn
2016-09-06 17:20   ` Graham Cobb
2016-09-07 11:58     ` Austin S. Hemmelgarn
2016-09-07 14:44       ` Christoph Anton Mitterer
2016-09-07 14:55         ` Austin S. Hemmelgarn
2016-09-07 15:20       ` Austin S. Hemmelgarn
2016-09-07 16:10         ` Graham Cobb
2016-09-07 17:33           ` Austin S. Hemmelgarn [this message]
2016-09-09 16:18       ` David Sterba
2016-09-09 16:58         ` Austin S. Hemmelgarn
2016-09-07 14:41     ` Christoph Anton Mitterer
2016-09-07 15:06       ` Austin S. Hemmelgarn
2016-09-07 16:27         ` Graham Cobb
2016-09-07 18:07         ` Christoph Anton Mitterer
2016-09-07 19:08           ` Austin S. Hemmelgarn
2016-09-07 19:34             ` Chris Murphy
2016-09-08 11:48               ` Austin S. Hemmelgarn
2016-09-09 18:58                 ` Chris Murphy
2016-09-10 19:27                   ` Chris Murphy
2016-09-12 11:24                   ` Austin S. Hemmelgarn
2016-09-12 20:25                     ` Chris Murphy
2016-09-13 11:46                       ` Austin S. Hemmelgarn
2016-09-09 16:33             ` David Sterba
2016-09-09 17:21               ` Austin S. Hemmelgarn
2016-09-07 20:29           ` Zygo Blaxell

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=6b29e923-4cef-cd78-cd98-d59419cc2341@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=g.btrfs@cobb.uk.net \
    --cc=linux-btrfs@vger.kernel.org \
    /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).