Public bug reported:

This bug is related to:
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/474258

In spite of the implementation of cryptswap checking for existing
filesystems, I think I have encountered a bug. cryptswap still creates
the swap partition if the target partition does not contain a
filesystem, but a LUKS partition.

I have been able to reproduce this issue without meaning to. After
adding a drive my /dev/sdX assignments shifted, and I lost a partition
full of data. However, in spite of attempts to recreate the data
partition, the LUKS header kept being overwritten by random data.

That's when I saw this: https://imgur.com/Zl5sYbkl.png

cryptswap has been overwriting the partitions. The partitions contained
LUKS Encrypted ext4 filesystems created using gnome-disks.

I have a specific hardware device that I use for SWAP, so in a way it
was my own mistake for not updating /etc/crypttab when connecting the
new drive, but in my opinion cryptswap should not destroy a LUKS
partition to a point where even with header it is difficult to recover
any data simply because a drive has been changed. As far as I have been
able to find, cryptswap with UUID is still not possible after all.

** Affects: cryptsetup (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: dataloss

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

Title:
  cryptswap overwrites existing LUKS partition

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


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

Reply via email to