eternaltyro / cryptsetup

Since Google code is shuttering...
http://code.google.com/p/cryptsetup
GNU General Public License v2.0
0 stars 0 forks source link

Wrong arguments passed to crypt_activate_by_keyfile_offset #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In cryptsetup.c:202

r = crypt_activate_by_keyfile_offset(cd, action_argv[1], CRYPT_ANY_SLOT, 
opt_key_file, opt_keyfile_size, opt_keyfile_size, activate_flags);

opt_keyfile_size is passed twice. The 6th argument is the keyfile offset. The 
intention was probably to pass "opt_keyfile_offset" after the size:

r = crypt_activate_by_keyfile_offset(cd, action_argv[1], CRYPT_ANY_SLOT, 
opt_key_file, opt_keyfile_size, opt_keyfile_offset, activate_flags);

This issue only affects loop-aes devices when --keyfile-size or 
--keyfile-offset is passed. Is this a proper bug or am I missing something?

Original issue reported on code.google.com by expugnat...@gmail.com on 12 May 2014 at 11:57

GoogleCodeExporter commented 9 years ago
I think it is bug but loopAES cannot use keyfile-offset properly anyway (the 
format of keyfile is different, it contains keys separated by EOL).

Will check this later...

Original comment by gmazyl...@gmail.com on 18 May 2014 at 9:22

GoogleCodeExporter commented 9 years ago
Fixed in
https://code.google.com/p/cryptsetup/source/detail?r=49e55c0f42ece2debed75948539
46fc8608a726a

(So --keyfile-size and --keyfile-offset now works properly for loopaes crypt 
type.)

Thanks.

Original comment by gmazyl...@gmail.com on 14 Jun 2014 at 12:38