linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Security implications of btrfs receive?
Date: Mon, 5 Sep 2016 14:33:28 +0000 (UTC)	[thread overview]
Message-ID: <pan$7ef49$a651be36$e2e9c638$c9b8a81e@cox.net> (raw)
In-Reply-To: c04c596d-4cb9-ed98-513a-c550b1be18b2@cobb.uk.net

Graham Cobb posted on Mon, 05 Sep 2016 10:59:30 +0100 as excerpted:

> Lastly, even if receive is designed to be very secure, it is possible
> that it could trigger/use code paths in the btrfs kernel code which are
> not normally used during normal file operations and so could trigger
> bugs not normally seen.  Has any work been done on testing for that (for
> example tests using malicious streams, including ones which btrfs-send
> cannot generate)?

As a btrfs user and list regular (not a dev) I'll only answer this part, 
as it's the part I know an answer to. =:^)

Btrfs in general is not fuzz- or malicious-content resistant, yet.  In 
general, btrfs is considered stabilizing, but not yet fully stable, and 
fuzzer-related bug reports, as others, are taken and worked on, but the 
emphasis has been primarily on getting things working and bugs fixed in 
general, not yet on security hardening of any sort, so no claims as to 
btrfs hardening or resistance to malicious content can be made at this 
point, except that it's known to be pretty soft in that regard ATM.

As I said, fuzz-generated bugs are accepted and fixed, but I don't know 
that the intent is to ever "harden" btrfs in that regard, more to simply 
make it resilient to corruptions in general.

There has been, for instance, some discussion of attacks by simply 
leaving maliciously engineered btrfs thumb drives around to be inserted 
and automounted, but the attitude seems to be once they have physical 
access to plug them in, hardening is an exercise in futility, so the 
object isn't to prevent that attack vector, but rather, to make btrfs 
more resilient to normal (as opposed to deliberate) corruption that may 
occur, including that which is easiest to /find/ by fuzzing, but which 
may "just happen" in the real world, as well.

Of course that's not in the specific scope of receive, but I'd put it in 
the same boat.  IOW, treat potential send clients much as you would 
people with accounts on the machine.  If you wouldn't trust them with a 
basic shell account, don't trust their send-streams either.

Meanwhile, the stabilizing but not fully stable and mature status also 
means backups are even more strongly recommended than they would be with 
a fully stable filesystem.  Which means, to the extent that backups can 
mitigate the issue, they'd certainly be prudent and may to that extent 
solve the practical issue.  However, as always, if it's not backed up and 
you lose it, you've simply lost the low-value data that wasn't of enough 
value to you to be worth the hassle of backup, defined by your actions as 
such, regardless of any words claiming the contrary.  To the extent that 
you can trust your people as much as your backups, great, but not having 
those backups really /is/ defining that data as not worth the hassle, 
regardless of whether it's lost to malicious attack or to hardware/
software/wetware bug.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


  reply	other threads:[~2016-09-05 14: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 [this message]
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
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='pan$7ef49$a651be36$e2e9c638$c9b8a81e@cox.net' \
    --to=1i5t5.duncan@cox.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).