eworm-de / mkinitcpio-ykfde

Full disk encryption with Yubikey (Yubico key)
GNU General Public License v3.0
109 stars 26 forks source link

Seg fault #22

Closed dschaper closed 6 years ago

dschaper commented 6 years ago

I'm trying to configure with a Yubi 4 and when I run ykfde I get a segmentation fault.

Latest kernel, 4.14.11

Let me know what debugging info you need, I'm happy to help out.

dschaper commented 6 years ago

I've got the stack traces of the faults:

 Process 8855 (ykfde) of user 0 dumped core.

                                                   Stack trace of thread 8855:
                                                   #0  0x00005615d4c06b6b n/a (ykfde)
                                                   #1  0x00007f0396ce8f4a __libc_start_main (libc.so.6)
                                                   #2  0x00005615d4c0714a n/a (ykfde)

                                                   Stack trace of thread 8856:
                                                   #0  0x00007f0396db3f2b __poll (libc.so.6)
                                                   #1  0x00007f0396ab7d31 n/a (libusb-1.0.so.0)
                                                   #2  0x00007f039688f08a start_thread (libpthread.so.0)
                                                   #3  0x00007f0396dbe42f __clone (libc.so.6)
eworm-de commented 6 years ago

Please give some more information. What does the configuration look like? What command line options for ykfde are used?

dschaper commented 6 years ago

I'll update in a couple of days, I'm rebuilding everything again to make sure that I'm not causing a seqfault due to a misconfiguration on my end. If I'm still getting it I'll post up the config and the command invocation. I'm switching to the lts kernel for zfs support and will see if that kernel has the same situation.

Thanks for the quick reply!

dschaper commented 6 years ago
[13096]: pam_unix(sudo:session): session opened for user root by dschaper(uid=0)
[13102]: segfault at 0 ip 0000558f030f4b6b sp 00007ffcdbcd59c0 error 4 in ykfde[558f030f3000+3000]
Started Process Core Dump (PID 13120/UID 0).
[13096]: pam_unix(sudo:session): session closed for user root
[13122]: Process 13102 (ykfde) of user 0 dumped core.

      Stack trace of thread 13102:
      #0  0x0000558f030f4b6b n/a (ykfde)
      #1  0x00007efd0ed60f4a __libc_start_main (libc.so.6)
      #2  0x0000558f030f514a n/a (ykfde)

     Stack trace of thread 13103:
      #0  0x00007efd0ee2b91b __poll (libc.so.6)
      #1  0x00007efd0eb2fd31 n/a (libusb-1.0.so.0)
      #2  0x00007efd0e90708c start_thread (libpthread.so.0)
      #3  0x00007efd0ee35e1f __clone (libc.so.6)

ykfde.conf


[general]
# Specify what Yubikey slot to use for full disk encryption.
# This is just the system default, you can configure one or more
# Yubikeys below.
# The specified slot has to be configured for HMAC-SHA1.
yk slot = 2

# This is the LUKS device. Make sure you use the name, not
# block device, e.g. it has to match first column of
# /etc/crypttab.initramfs.
device name = cryptboot

# Do we use second factor? This setting controls wheter or not
# support is added to initramfs.
second factor = no

# For every Yubikey in use add a section here.
# * 'yk slot' is optional and only required for keys differing
#   from system default.
# * 'luks slot' is required to make sure one Yukikey is associated
#   with exactly one LUKS slot!
[6644971]
#yk slot = 1
luks slot = 6

Command invocation:

sudo ykfde

dschaper commented 6 years ago

Invoking without sudo errors with an unable to open /etc/ykfde.d/ for writing the challenge.

dschaper commented 6 years ago

I think it may have been traced down to a bad LANG environment. Not sure, just nuked the root zpool and loaded a fresh on and it seems to be working just fine. Need to try out all the features, and see how it works. Closing this out.