Input/Output Error when trying to --test-passphrase luksOpen
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
dfg@dfg-pc:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
dfg@dfg-pc:~ $ uname -a
Linux dfg-pc 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
dfg@dfg-pc:~ $ apt-cache policy cryptsetup
cryptsetup:
Installed: 2:1.6.6-5ubuntu2
Candidate: 2:1.6.6-5ubuntu2
Version table:
*** 2:1.6.6-5ubuntu2 500
500 http://
100 /var/lib/
root@dfg-pc:~ # ls -lh /home/dfg/
-rw------- 1 dfg dfg 5.0G Dec 25 12:08 /home/dfg/
root@dfg-pc:~ # cryptsetup -v --test-passphrase luksOpen /home/dfg/
Enter passphrase for /home/dfg/
Command failed with code 5: Input/output error
root@dfg-pc:~ # echo $?
1
Observed behavior: Cryptsetup terminates after 1st passphrase entry. It does not prompt for a second try.
Expected behavior: Cryptsetup accepts provided passphrase or prompts for 2nd try.
root@dfg-pc:~ # cryptsetup -v luksDump /home/dfg/
LUKS header information for /home/dfg/
Version: 1
Cipher name: aes
Cipher mode: ecb-plain64
Hash spec: ripemd160
Payload offset: 2048
MK bits: 128
MK digest: [...removed for posting...]
MK salt: [...removed for posting...]
MK iterations: 35250
UUID: [...removed for posting...]
Key Slot 0: ENABLED
Iterations: 140659
Salt: [...removed for posting...]
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
Command successful.
The overall context/system is:
a) Issue possibly related to release upgrade from 14.04(.1?) to 16.04.1. Worked before upgrade. Not sure if it ever worked after the upgrade. However, I performed the upgrade only some days ago.
b) /home/dfg/
c) For this device things work as expected:
root@dfg-pc:~ # cryptsetup -v --test-passphrase luksOpen /dev/disk/
Enter passphrase for /dev/disk/
No key available with this passphrase.
Enter passphrase for /dev/disk/
No key available with this passphrase.
Enter passphrase for /dev/disk/
Key slot 0 unlocked.
Command successful.
root@dfg-pc:~ # echo $?
0
More information via the following command
root@dfg-pc:~/tmp # strace -o strace.txt cryptsetup -v --test-passphrase luksOpen /home/dfg/
Enter passphrase for /home/dfg/
Command failed with code 5: Input/output error
root@dfg-pc:~/tmp # echo $?
1
yields
open("/dev/tty", O_RDWR) = 5
ioctl(5, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(5, "Enter passphrase for /home/dfg/d"..., 57) = 57
ioctl(5, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon -echo ...}) = 0
ioctl(5, TCGETS, {B38400 opost isig icanon -echo ...}) = 0
read(5, "[the correct passphrase]\n", 512) = [length of passphrase]
ioctl(5, TCGETS, {B38400 opost isig icanon -echo ...}) = 0
ioctl(5, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) = 0
ioctl(5, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(5, "\n", 1) = 1
close(5) = 0
socket(PF_ALG, SOCK_SEQPACKET, 0) = 5
bind(5, {sa_family=AF_ALG, sa_data=
accept(5, NULL, NULL) = 6
setsockopt(5, SOL_ALG, 1, "\244\304\
open("/
fstat(7, {st_mode=
close(7) = 0
open("/
lseek(7, 4096, SEEK_SET) = 4096
fstatfs(7, {f_type=
brk(0x204a000) = 0x204a000
brk(0x2049000) = 0x2049000
read(7, "[data]"..., 61440) = 61440
read(7, "[data]"..., 4096) = 4096
brk(0x2039000) = 0x2039000
close(7) = 0
sendmsg(6, {msg_name(0)=NULL, msg_iov(
close(5) = 0
close(6) = 0
brk(0x202a000) = 0x202a000
munlockall() = 0
setpriority(
open("/
open("/
open("/
open("/
write(2, "Command failed with code 5", 26) = 26
write(2, ": Input/output error\n", 21) = 21
exit_group(1) = ?