I have come up with a potential security flaw with this design:

The user installs Ubuntu with this fixed passphrase. This is used to
derive the "user key", which is used to encrypt the "master key", which
is used to encrypt their data. The encrypted version of the master key
is obviously written to disk.

Later, the user changes their passphrase. This rewraps the master key
with a new user key (derived from the new/real passphrase). It writes
that to disk. But, I presume that does NOT overwrite the old wrapped key
in place on disk. I don't actually know this, but I am assuming so based
on the general design of ZFS being copy-on-write. As far as I know, only
uberblocks are rewritten in place.

Therefore, it is possible for some indeterminate amount of time to read
the old wrapped master key off the disk, which can be decrypted using
the known passphrase. This gives the master key, which can then be used
to decrypt the _existing_ data.

If the master key is not rotated when using zfs change-key, then _new_
data can also be read for some indefinite period of time. I'm not 100%
sure whether change-key changes the master key or only the user key.
>From the man page, it sounds like it does change the master key. It
says, "...use zfs change-key to break an existing relationship, creating
a new encryption root..."

I'll try to get a more clueful answer on these points.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1857398

Title:
  ubiquity should support encryption by default with zfsroot, with users
  able to opt in to running change-key after install

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1857398/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to