[dm-crypt] Broken LUKS header

Arno Wagner arno at wagner.name
Wed Sep 3 13:32:33 CEST 2014


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 at saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt


-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno at 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


More information about the dm-crypt mailing list