[dm-crypt] Offset/size issue during LUKS recovery.

Arno Wagner arno at wagner.name
Fri Jul 15 11:13:51 CEST 2016


On Fri, Jul 15, 2016 at 02:52:35 CEST, Julio Cesar Faracco wrote:
> Hi,
> 
> Since I moved to the version 1.6.7 of cryptsetup, I started to have some problems to recovery a LUKS partition
> using a LUKS header file and a valid passphrase.
> 
> # cryptsetup luksDump my_header_file --debug
> # Detected kernel Linux 3.10.0-327.13.1.el7.x86_64 x86_64.
> # Reading LUKS header of size 1024 from device /tmp/my_header_file
> # Key length 64, device size 8192 sectors, header size 4036 sectors.
[...]
> # # cryptsetup luksOpen /dev/loop0 my_enc_partition <<EOF
> $(PASSWORD)
> EOF
> # Detected kernel Linux 3.10.0-327.13.1.el7.x86_64 x86_64.
> # Reading LUKS header of size 1024 from device /tmp/my_header_file
> # Key length 64, device size 4060 sectors, header size 4036 sectors.

I take it, the device is  8192 sectors, i.e. 4MB? 

If so, there seem to be a bug in device-size detection
as used by luksOpen.

Regards,
Arno

-- 
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