Issues when switching between smartcards

Fabio Coatti fabio.coatti at gmail.com
Wed Oct 2 15:18:44 CEST 2013


Hi all,
I'm recently facing an issue: simply put, I'm unable to switch smarcards.
The scenario is the followig: I have two different cards with two different set 
of keys. (E,S,A)

I have card A inserted in smartcard reader (HP Folio 9470m build in reader)
==============
[mer ott  2 14:41:28 2013] usb 2-1.8: New USB device found, idVendor=058f, 
idProduct=9540
[mer ott  2 14:41:28 2013] usb 2-1.8: New USB device strings: Mfr=1, 
Product=2, SerialNumber=0
[mer ott  2 14:41:28 2013] usb 2-1.8: Product: EMV Smartcard Reader
==============

The card is working fine.
Now I get an email signed with a different card (B) and a popup tells me to 
switch cards.
I do that, a popup appears requesting the PIN, but once entered kmail 
complains that it is unable to decrypt the message.

after that, gpg --card-status reports "card not present" but the card is 
inserted. (card B)

pcscd is crashed, looking at dmesg I see this:
 pcscd[10595]: segfault at 7f00beef8026 ip 00007f00beef8026 sp 
00007f00beee7f30 error 14 in libc-2.17.so[7f00bf319000+1a0000]


So I restart pcscd, then I have to kill scdaemon ... but it requires a kill 
-9, it seems scdaemon gets stuck.

After that, a gpg --card-status works again, but if I try to decrypt again the 
message the decryption fails in the same way, scdaemon stuck and so on.

The only effective way to get the system working again is to reboot the 
laptop... quite a invasive one.

admittedly, it could be a hardware glitch, but this does not accounts for 
scdaemon lock and pcscd segfault.

Tech infos:
distro: gentoo
Linux 3.11.3
glibc 2.17

pcscd from sys-apps/pcsc-lite-1.8.8-r1 
(pcsc-lite version 1.8.8)
app-crypt/gnupg-2.0.21
(gpg (GnuPG) 2.0.21 libgcrypt 1.5.3 )

Any help will be appreciated; for more information or debug just ask (with 
some suggestion, I'm a bit stuck here :) )

Many thanks for any answer.









--
Fabio



More information about the Gnupg-users mailing list