[pkg-cryptsetup-devel] Bug#856038: cryptsetup: clear error message before each password re-try
lewis dorrel
lewis_dorrel at mail.com
Fri Feb 24 20:19:48 UTC 2017
Package: cryptsetup
Version: 2:1.6.6-5
Severity: normal
Dear Maintainer,
whenever a debian/ubuntu user fails to log in the first time to his full disk encrypted hard disk (or solid state disk) he continues to see the error message "cryptsetup: cryptsetup failed, bad password or options?" even if this is a new login try.
This problem might not be that noticeable whenever the user has a very fast hardware and configured very low crypt settings. Furthermore, it may not be easily noticeable when you have a text-based login prompt only. In all other cases, it is quite disturbing to see the old error message e.g. "cryptsetup: cryptsetup failed, bad password or options?" for seconds or minutes (depending on your hardware, algorithm settings etc) on a new/independent password login try.
I've located the problem within the file /usr/share/initramfs-tools/scripts/local-top/cryptroot . Especially the line: $cryptkeyscript "$cryptkey" | $cryptopen (see https://anonscm.debian.org/cgit/pkg-cryptsetup/cryptsetup.git/tree/debian/initramfs/cryptroot-script#n309 ).
This line suggests that the script waits until the user enters the password (could take a while) and hits enter and the disk was tried to be opened (this could even take longer).
During all of this time the user will still be presented with the old error messages (if he failed to log in with the previous login tries). The error message was presented by the message() function and in case plymouth is working, the /bin/plymouth binary was used.
I therefore suggest that whenever the user tries to log in (again), the previous error messages should be hidden/cleared after the user hit enter (makes a new password login).
The main problem is that it might be very confusing for the user that he is presented with old error messages which are unrelated to the current try. The error message might suggest that the login failed (again) even if it did not.
Thanks
-- Package-specific info:
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.16.0-4-amd64 root=/dev/mapper/deb3--vg-root ro initrd=/install/gtk/initrd.gz quiet
-- /etc/crypttab
sdb5_crypt UUID=9841d736-2747-4e2b-afed-0b9fe7dbeb4e none luks
-- /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/deb3--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sdb1 during installation
UUID=a553fd08-701e-4a21-b37c-a134bfd91d15 /boot ext2 defaults 0 2
/dev/mapper/deb3--vg-swap_1 none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
-- lsmod
Module Size Used by
binfmt_misc 16949 1
ctr 12927 3
ccm 17577 3
nfsd 262938 2
auth_rpcgss 51209 1 nfsd
oid_registry 12419 1 auth_rpcgss
nfs_acl 12511 1 nfsd
nfs 192232 0
lockd 83389 2 nfs,nfsd
fscache 45542 1 nfs
sunrpc 237364 6 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
arc4 12536 2
rt2800usb 26222 0
rt2x00usb 17642 1 rt2800usb
rt2800lib 81131 1 rt2800usb
rt2x00lib 42331 3 rt2x00usb,rt2800lib,rt2800usb
mac80211 482315 3 rt2x00lib,rt2x00usb,rt2800lib
cfg80211 413730 2 mac80211,rt2x00lib
crc_ccitt 12347 1 rt2800lib
joydev 17063 0
snd_hda_codec_hdmi 45118 1
x86_pkg_temp_thermal 12951 0
intel_powerclamp 17159 0
snd_hda_codec_realtek 67168 1
snd_hda_codec_generic 63181 1 snd_hda_codec_realtek
intel_rapl 17356 0
snd_hda_intel 26407 7
snd_hda_controller 26646 1 snd_hda_intel
coretemp 12820 0
kvm_intel 139156 0
kvm 392897 1 kvm_intel
snd_hda_codec 104500 5 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep 13148 1 snd_hda_codec
snd_pcm 88662 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
iTCO_wdt 12831 0
snd_timer 26720 1 snd_pcm
iTCO_vendor_support 12649 1 iTCO_wdt
snd 65338 22 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
eeepc_wmi 12600 0
soundcore 13026 2 snd,snd_hda_codec
serio_raw 12849 0
asus_wmi 22781 1 eeepc_wmi
shpchp 31121 0
sparse_keymap 12818 1 asus_wmi
mei_me 17941 0
mei 74977 1 mei_me
rfkill 18867 3 cfg80211,asus_wmi
lpc_ich 20768 0
mfd_core 12601 1 lpc_ich
i2c_i801 16965 0
battery 13356 0
pcspkr 12595 0
evdev 17445 9
processor 28221 0
vmhgfs 65266 0
vmw_vmci 55383 1 vmhgfs
fuse 83350 1
parport_pc 26300 0
ppdev 16782 0
lp 17074 0
parport 35749 3 lp,ppdev,parport_pc
autofs4 35529 2
ext4 477894 2
crc16 12343 1 ext4
mbcache 17171 1 ext4
jbd2 82514 1 ext4
algif_skcipher 17349 0
af_alg 13034 1 algif_skcipher
hid_generic 12393 0
usbhid 44460 0
hid 102264 2 hid_generic,usbhid
dm_crypt 22595 1
dm_mod 89405 9 dm_crypt
usb_storage 56215 0
sg 29973 0
sd_mod 44356 3
sr_mod 21903 0
crc_t10dif 12431 1 sd_mod
cdrom 47424 1 sr_mod
crct10dif_generic 12581 0
crct10dif_pclmul 13387 1
crct10dif_common 12356 3 crct10dif_pclmul,crct10dif_generic,crc_t10dif
ahci 33334 2
crc32_pclmul 12915 0
crc32c_intel 21809 0
libahci 27158 1 ahci
nouveau 1122508 0
mxm_wmi 12515 1 nouveau
i2c_algo_bit 12751 1 nouveau
ttm 77862 1 nouveau
ehci_pci 12512 0
drm_kms_helper 49210 1 nouveau
ehci_hcd 69837 1 ehci_pci
libata 177508 2 ahci,libahci
aesni_intel 151423 8
xhci_hcd 152977 0
aes_x86_64 16719 1 aesni_intel
lrw 12757 1 aesni_intel
gf128mul 12970 1 lrw
scsi_mod 191405 5 sg,usb_storage,libata,sd_mod,sr_mod
glue_helper 12695 1 aesni_intel
ablk_helper 12572 1 aesni_intel
cryptd 14516 3 aesni_intel,ablk_helper
e1000e 212128 0
psmouse 99249 0
drm 249998 3 ttm,drm_kms_helper,nouveau
ptp 17692 1 e1000e
usbcore 195468 7 rt2x00usb,usb_storage,rt2800usb,ehci_hcd,ehci_pci,usbhid,xhci_hcd
pps_core 17225 1 ptp
i2c_core 46012 5 drm,i2c_i801,drm_kms_helper,i2c_algo_bit,nouveau
usb_common 12440 1 usbcore
wmi 17339 3 mxm_wmi,nouveau,asus_wmi
fan 12681 0
thermal 17559 0
video 18096 2 nouveau,asus_wmi
thermal_sys 27642 6 fan,video,intel_powerclamp,thermal,processor,x86_pkg_temp_thermal
button 12944 1 nouveau
-- System Information:
Debian Release: 8.7
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages cryptsetup depends on:
ii cryptsetup-bin 2:1.6.6-5
ii debconf [debconf-2.0] 1.5.56
ii dmsetup 2:1.02.90-2.2+deb8u1
ii libc6 2.19-18+deb8u7
Versions of packages cryptsetup recommends:
ii busybox 1:1.22.0-9+deb8u1
ii console-setup 1.123
ii initramfs-tools [linux-initramfs-tool] 0.120+deb8u2
ii kbd 1.15.5-2
Versions of packages cryptsetup suggests:
ii dosfstools 3.0.27-1
pn keyutils <none>
ii liblocale-gettext-perl 1.05-8+b1
-- debconf information excluded
More information about the pkg-cryptsetup-devel
mailing list