linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: "S.J." <sorry@anonym.com>, linux-btrfs@vger.kernel.org
Subject: Re: attacking btrfs filesystems via UUID collisions?
Date: Thu, 10 Dec 2015 07:08:51 -0500	[thread overview]
Message-ID: <56696B53.7070905@gmail.com> (raw)
In-Reply-To: <5668A1CB.1020007@anonym.com>

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

On 2015-12-09 16:48, S.J. wrote:
>> 1. better practices, we really need to tell users, and documentation
>> writers, that using dd (or variant) to copy Btrfs volumes has a
>> consequence and should not be used to make copies.
> 
>> 2. Btrfs needs a better way to make a copy of a volume when there are
>> snapshots (including even rw snapshots); e.g. permit send/receive to
>> work on rw snapshots if the fs is ro mounted; e.g. a way to do
>> "recursive" send/receive.
> 
>> 3. Some way to fail gracefully, when there's ambiguity that cannot be
>> resolved. Once there are duplicate devs (dd or lvm snapshots, etc)
>> then there's simply no way to resolve the ambiguity automatically, and
>> the volume should just refuse to rw mount until the user resolves the
>> ambiguity. I think it's OK to fallback to ro mount (maybe) by default
>> in such a case rather than totally fail to mount.
> 
> About 3:
> RO fallback for the second device/partitions is not good.
> It won't stop confusing the two partitions, and even if both are RO,
> thinking it's ok to read and then reading the wrong data is bad.
> 
> About 1 and 2 ... if 3 gets fulfilled, why?
> DD itself is not a problem "if" the UUID is changed after it
> (which is a command as simple as dd), and if someone doesn't
> know that, he/she will notice when mount refuses to work
> because UUID duplicate.
Unless things have changed significantly, changing the UUID on a BTRFS
image is not anywhere near as simple as copying it with dd.  The UUID
gets used internally somehow, and changing it would require rewriting
_all_ the metadata blocks.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

  reply	other threads:[~2015-12-10 12:08 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 [this message]
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
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=56696B53.7070905@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sorry@anonym.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).