[pkg-cryptsetup-devel] Bug#768407: Passphrase management problem
Quentin Lefebvre
qlefebvre_pro at yahoo.com
Sun Nov 16 23:16:36 UTC 2014
Hi,
I'm currently investigating such kind of trouble on my laptop.
During my tests, I created the following plain partition :
dd if=/dev/zero of=/test1.loop bs=10M count=1
cryptsetup open --type plain /test1.loop test1
(I enter a blank password by directly typing enter)
mkfs.ext2 /dev/mapper/test1
Of course, at this stage, mounting /dev/mapper/test1 succeeds.
BUT, then, I type :
cryptsetup close test1
cryptdisks_start test1
mount /dev/mapper/test1 /media/TMP
this last command fails !
By the way, the /etc/crypttab used for my test contains :
test1 /test1.loop none noauto
which has the advantage to take the same default values as cryptsetup
(I'm not saying it's good practice not to specify the cipher, hash algo,
and so on... anyway...).
So I investigated cryptdisks_start script... and I found a solution :
dd if=/dev/zero of=/test1.loop bs=10M count=1
/lib/cryptsetup/askpass "Damn password bug" | cryptsetup --key-file=-
open --type plain /test1.loop test1
(I enter a blank password by directly typing enter)
mkfs.ext2 /dev/mapper/test1
cryptsetup close test1
cryptdisks_start test1
mount /dev/mapper/test1 /media/TMP
THIS works...
So, obviously, there is a problem in the passphrase management made by
the current cryptsetup version.
I encourage you to test the scenario I described.
If I can, I'll debug cryptsetup and askpass to find the bug.
I hope this can help to solve Clayton's bug, and maybe mine (which I'll
report soon as it doesn't involve a passphrase but a key file).
Best regards,
Quentin
PS : By the way, I also upgraded recently from Wheezy to Jessie. This
bug is definitely Jessie-related.
More information about the pkg-cryptsetup-devel
mailing list