* [dm-crypt] Broken LUKS header
@ 2014-09-03 9:03 Andreas Aßmann
2014-09-03 11:32 ` Arno Wagner
2014-09-03 14:56 ` Robert Nichols
0 siblings, 2 replies; 4+ messages in thread
From: Andreas Aßmann @ 2014-09-03 9:03 UTC (permalink / raw)
To: dm-crypt@saout.de
[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]
Hi everyboy,
I got a (serious) problem with a broken LUKS header.
A little background:
I've
been using dm-crypt / LUKS for many years without ever having any
problems until now. On one of my Linux boxes, I have three encrypted
volumes for root (/dev/sda2), swap (/dev/sda3) and home (/dev/sdb1).
My problem:
A
few days ago, I tried to add a key file to all three volumes using
'cryptsetup luksAddKey'. The command succeeded for sda2 and sda3. Adding
the key file to sdb1, however, failed with 'Invalid Key Slot 6, Invalid
Key Slot 7'. It seems the LUKS header of sdb1 was corrupted in the
process. Probing the header using 'cryptsetup luksDump' fails with the
same error message.
Fortunately, sdb1 was unlocked and mounted
when this happened - I was still able to access data on this volume and
from what I've seen, everything is still intact, so I created a complete
backup right away using rsync. However, I would feel much better if I
could repair the header to verify that the backup I made actually
contains all data from sdb1.
I also created a 1:1 backup of sdb1
using dd. On this backup, I tried 'keyslot_checker' and 'cryptsetup
repair'. The first didn't work at all, the latter reported invalid
offsets for key slots 6 and 7 and fixed them. However, I was unable to
open the volume using my normal passphrase afterwards, so that didn't
work out as expected.
Help would be greatly appreciated. Sorry for my bad English, I am not a native speaker.
[-- Attachment #2: Type: text/html, Size: 1773 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] Broken LUKS header
2014-09-03 9:03 [dm-crypt] Broken LUKS header Andreas Aßmann
@ 2014-09-03 11:32 ` Arno Wagner
2014-09-03 14:56 ` Robert Nichols
1 sibling, 0 replies; 4+ messages in thread
From: Arno Wagner @ 2014-09-03 11:32 UTC (permalink / raw)
To: dm-crypt
Hat do you mean by the keyslot checker "did not work at all"?
Have you tried it after the wrong offsets were corrected?
I suspect the damage has existed for a time and you only
now found it. Wrong offsets can in principle only be
corruption done from external, as these do not get
written after header creation, AFAIK.
Arno
On Wed, Sep 03, 2014 at 11:03:46 CEST, Andreas Aßmann wrote:
> Hi everyboy,
>
> I got a (serious) problem with a broken LUKS header.
>
> A little background:
> I've
> been using dm-crypt / LUKS for many years without ever having any
> problems until now. On one of my Linux boxes, I have three encrypted
> volumes for root (/dev/sda2), swap (/dev/sda3) and home (/dev/sdb1).
>
> My problem:
> A
> few days ago, I tried to add a key file to all three volumes using
> 'cryptsetup luksAddKey'. The command succeeded for sda2 and sda3. Adding
> the key file to sdb1, however, failed with 'Invalid Key Slot 6, Invalid
> Key Slot 7'. It seems the LUKS header of sdb1 was corrupted in the
> process. Probing the header using 'cryptsetup luksDump' fails with the
> same error message.
>
> Fortunately, sdb1 was unlocked and mounted
> when this happened - I was still able to access data on this volume and
> from what I've seen, everything is still intact, so I created a complete
> backup right away using rsync. However, I would feel much better if I
> could repair the header to verify that the backup I made actually
> contains all data from sdb1.
>
> I also created a 1:1 backup of sdb1
> using dd. On this backup, I tried 'keyslot_checker' and 'cryptsetup
> repair'. The first didn't work at all, the latter reported invalid
> offsets for key slots 6 and 7 and fixed them. However, I was unable to
> open the volume using my normal passphrase afterwards, so that didn't
> work out as expected.
>
> Help would be greatly appreciated. Sorry for my bad English, I am not a native speaker.
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] Broken LUKS header
2014-09-03 9:03 [dm-crypt] Broken LUKS header Andreas Aßmann
2014-09-03 11:32 ` Arno Wagner
@ 2014-09-03 14:56 ` Robert Nichols
1 sibling, 0 replies; 4+ messages in thread
From: Robert Nichols @ 2014-09-03 14:56 UTC (permalink / raw)
To: dm-crypt
On 09/03/2014 04:03 AM, Andreas Aßmann wrote:
> A few days ago, I tried to add a key file to all three volumes using 'cryptsetup
> luksAddKey'. The command succeeded for sda2 and sda3. Adding the key file to
> sdb1, however, failed with 'Invalid Key Slot 6, Invalid Key Slot 7'. It seems
> the LUKS header of sdb1 was corrupted in the process. Probing the header using
> 'cryptsetup luksDump' fails with the same error message.
>
> Fortunately, sdb1 was unlocked and mounted when this happened - I was still able
> to access data on this volume and from what I've seen, everything is still
> intact, so I created a complete backup right away using rsync. However, I would
> feel much better if I could repair the header to verify that the backup I made
> actually contains all data from sdb1.
>
> I also created a 1:1 backup of sdb1 using dd. On this backup, I tried
> 'keyslot_checker' and 'cryptsetup repair'. The first didn't work at all, the
> latter reported invalid offsets for key slots 6 and 7 and fixed them. However, I
> was unable to open the volume using my normal passphrase afterwards, so that
> didn't work out as expected.
Do you still have sdb1 unlocked? If so, you can recover the master key and
also make a backup image of the decrypted volume. Instructions for recovering
the master key are in section 6.10 of the Cryptsetup FAQ at
<http://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions>
To save an image of the decrypted volume just use dd to copy the
/dev/mapper/xxx device to a file somewhere.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dm-crypt] Broken LUKS header
@ 2014-09-03 9:00 Andreas Aßmann
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Aßmann @ 2014-09-03 9:00 UTC (permalink / raw)
To: dm-crypt@saout.de
[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]
Hi everyboy,
I got a (serious) problem with a broken LUKS header.
A little background:
I've been using dm-crypt / LUKS for many years without ever having any problems until now. On one of my Linux boxes, I have three encrypted volumes for root (/dev/sda2), swap (/dev/sda3) and home (/dev/sdb1).
My problem:
A few days ago, I tried to add a key file to all three volumes using 'cryptsetup luksAddKey'. The command succeeded for sda2 and sda3. Adding the key file to sdb1, however, failed with 'Invalid Key Slot 6, Invalid Key Slot 7'. It seems the LUKS header of sdb1 was corrupted in the process. Probing the header using 'cryptsetup luksDump' fails with the same error message.
Fortunately, sdb1 was unlocked and mounted when this happened - I was still able to access data on this volume and from what I've seen, everything is still intact, so I created a complete backup right away using rsync. However, I would feel much better if I could repair the header to verify that the backup I made actually contains all data from sdb1.
I also created a 1:1 backup of sdb1 using dd. On this backup, I tried 'keyslot_checker' and 'cryptsetup repair'. The first didn't work at all, the latter reported invalid offsets for key slots 6 and 7 and fixed them. However, I was unable to open the volume using my normal passphrase afterwards, so that didn't work out as expected.
Help would be greatly appreciated. Sorry for my bad English, I am not a native speaker.
[-- Attachment #2: Type: text/html, Size: 1735 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-03 14:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-03 9:03 [dm-crypt] Broken LUKS header Andreas Aßmann
2014-09-03 11:32 ` Arno Wagner
2014-09-03 14:56 ` Robert Nichols
-- strict thread matches above, loose matches on Subject: below --
2014-09-03 9:00 Andreas Aßmann
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.