Hi.

I happen to also be affected by this bug and managed to narrow it down.

I guess the problem lies in the function sync_initial_tokens_from_driver 
(https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/blob/master/plugins/smartcard/gsd-smartcard-manager.c#L461).
The code assumes that gck_slot_get_token_info won't return NULL.

However looking in gck, it does return NULL if C_GetTokenInfo returns an
error (https://gitlab.gnome.org/GNOME/gcr/-/blob/master/gck/gck-
slot.c#L688).


And this is precisely the behavior of opensc-pkcs11.so when it sees an 
unrecognized token. It returns the token in C_GetSlotList (as present), but 
returns an error when calling C_GetTokenInfo.

So if you login as a user with your USB token plugged in, gsd-smartcard
will crash in a loop.

** Changed in: gnome-settings-daemon (Ubuntu)
       Status: Expired => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-settings-daemon in Ubuntu.
https://bugs.launchpad.net/bugs/2016914

Title:
  gsd-smartcard: segfault on startup

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/2016914/+subscriptions


-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to