All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Anton Mitterer <calestyo@scientia.net>
To: Hugo Mills <hugo@carfax.org.uk>,
	"Austin S. Hemmelgarn" <ahferroin7@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: attacking btrfs filesystems via UUID collisions?
Date: Wed, 16 Dec 2015 13:10:09 +0100	[thread overview]
Message-ID: <1450267809.6259.16.camel@scientia.net> (raw)
In-Reply-To: <20151215144210.GH26782@carfax.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1377 bytes --]

On Tue, 2015-12-15 at 14:42 +0000, Hugo Mills wrote:
>    I would suggest trying to migrate to a state where detecting more
> than one device with the same UUID and devid is cause to prevent the
> FS from mounting, unless there's also a "mount_duplicates_yes_i_
> know_this_is_dangerous_and_i_know_what_im_doing" mount flag present,
> for the multipathing people. That will break existing userspace
> behaviour for the multipathing case, but the migration can probably
> be
> managed. (e.g. NFS has successfully changed default behaviour for one
> of its mount options in the last few(?) years).

I don't think that a single mountpoint a la "force-and-do-it" is a
proper solution here. It would still open surface for attacks and also
for accidents.
In the case mutli-pathing is used, the only realistic way seems to be
manually specifying the devices a la device=/dev/sda,/dev/sdb.

Of course btrfs would stil use the UUIDs/deviceIDs of these, but *only*
of those devices that have been whitelisted with the device=option.

In the case of a general "mount_duplicates_yes_iknow_th..." option you
could end up with having e.g. three duplicates, two being actually
mutli-paths, and the third one being a losetup or USB clone of the
image,... again allowing for the aforementioned attacks to happen, and
again allowing for severe corruption to occur.


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5313 bytes --]

  parent reply	other threads:[~2015-12-16 12:10 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 12:05 Subvolume UUID, data corruption? S.J
2015-12-04 13:07 ` Hugo Mills
2015-12-05  3:28   ` Christoph Anton Mitterer
2015-12-05  5:52     ` attacking btrfs filesystems via UUID collisions? (was: Subvolume UUID, data corruption?) Christoph Anton Mitterer
2015-12-05 12:01     ` Subvolume UUID, data corruption? Hugo Mills
2015-12-06  1:51       ` attacking btrfs filesystems via UUID collisions? (was: Subvolume UUID, data corruption?) Christoph Anton Mitterer
2015-12-11 12:33       ` Subvolume UUID, data corruption? Austin S. Hemmelgarn
2015-12-05 13:19     ` Duncan
2015-12-06  1:51       ` attacking btrfs filesystems via UUID collisions? (was: Subvolume UUID, data corruption?) Christoph Anton Mitterer
2015-12-06  4:06         ` Duncan
2015-12-09  5:07           ` Christoph Anton Mitterer
2015-12-09 11:54             ` Duncan
2015-12-06 14:34         ` attacking btrfs filesystems via UUID collisions? Qu Wenruo
2015-12-06 20:55           ` Chris Murphy
2015-12-09  5:39           ` Christoph Anton Mitterer
2015-12-09 21:48             ` S.J.
2015-12-10 12:08               ` Austin S Hemmelgarn
2015-12-10 12:41                 ` Hugo Mills
2015-12-10 12:57                   ` S.J.
2015-12-10 19:42               ` Chris Murphy
2015-12-11 22:21                 ` Christoph Anton Mitterer
2015-12-11 22:32                   ` Christoph Anton Mitterer
2015-12-11 23:06                   ` Chris Murphy
2015-12-12  1:34                     ` S.J.
2015-12-14  0:28                       ` Christoph Anton Mitterer
2015-12-14  0:27                     ` Christoph Anton Mitterer
2015-12-14 13:23                       ` Austin S. Hemmelgarn
2015-12-14 21:26                         ` Chris Murphy
2015-12-15  0:35                           ` Christoph Anton Mitterer
2015-12-15 13:54                           ` Austin S. Hemmelgarn
2015-12-15 14:18                             ` Hugo Mills
2015-12-15 14:27                               ` Austin S. Hemmelgarn
2015-12-15 14:42                                 ` Hugo Mills
2015-12-15 16:03                                   ` Austin S. Hemmelgarn
2015-12-16 12:14                                     ` Christoph Anton Mitterer
2015-12-16 12:10                                   ` Christoph Anton Mitterer [this message]
2015-12-16 12:03                               ` Christoph Anton Mitterer
2015-12-16 14:41                                 ` Chris Mason
2015-12-16 15:04                                   ` Christoph Anton Mitterer
2015-12-17  3:25                                     ` Duncan
2015-12-18  0:56                                       ` Christoph Anton Mitterer
2015-12-22  2:13                                       ` Kai Krakow
2015-12-16 12:03                             ` Christoph Anton Mitterer
2015-12-17  2:43                               ` Duncan
2015-12-15  0:08                         ` Christoph Anton Mitterer
2015-12-15 14:19                           ` Austin S. Hemmelgarn
2015-12-16 12:56                             ` Christoph Anton Mitterer
2015-12-14 20:55                       ` Chris Murphy
2015-12-15  0:22                         ` Christoph Anton Mitterer
2015-12-11 23:14                   ` Eric Sandeen
2015-12-11 22:06               ` Christoph Anton Mitterer

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=1450267809.6259.16.camel@scientia.net \
    --to=calestyo@scientia.net \
    --cc=ahferroin7@gmail.com \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.