Public bug reported:

Apparently there is a bug in the OpenSC PKCS11 library and keep
returning the token even after it has been removed.

Environment:
Arch x86_64
Ubuntu 19.10 (eoan)
OpenSC 0.19.0-2

Steps to reproduce:

I am using the command line pkcs11-tool to test the detection of the
insertion/removal of the token.

shell # pkcs11-tool --test-hotplug
Testing card detection using C_GetSlotList()
Please press return to continue, x to exit:                      <==== Token 
inserted
Available slots:
Slot 0 (0x0): Yubico Yubikey NEO OTP+U2F+CCID 00 00
  token label        : xxxxx
  token manufacturer : piv_II
  token model        : PKCS#15 emulated
  token flags        : login required, rng, token initialized, PIN initialized
  hardware version   : 0.0
  firmware version   : 0.0
  serial num         : xxxxxxxxx
  pin min/max        : 4/8

Please press return to continue, x to exit:                      <==== Token 
removed
Available slots:
Slot 0 (0x0): (GetSlotInfo failed, CKR_GENERAL_ERROR)

Please press return to continue, x to exit:
Available slots:
Slot 0 (0x0): (GetSlotInfo failed, CKR_GENERAL_ERROR)

Please press return to continue, x to exit:                      <==== Still 
detecting a token despite token being removed
Available slots:
Slot 0 (0x0): Yubico Yubikey NEO OTP+U2F+CCID 00 00
  token label        : xxxxx
  token manufacturer : piv_II
  token model        : PKCS#15 emulated
  token flags        : login required, rng, token initialized, PIN initialized
  hardware version   : 0.0
  firmware version   : 0.0
  serial num         : xxxxxxxxxxx
  pin min/max        : 4/8

Fix
A bug was opened with OpenSC and is now fixed as of version 0.20.0
https://github.com/OpenSC/OpenSC/issues/1706

Would it be possible to upgrade OpenSC to 0.20.0 in the next version?

** Affects: opensc (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: pam-pkcs11 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: upgrade-software-version

** Description changed:

  Apparently there is a bug in the OpenSC PKCS11 library and keep
  returning the token even after it has been removed.
  
  Environment:
  Arch x86_64
  Ubuntu 19.10 (eoan)
- OpenSC 0.19.0-2 
- 
+ OpenSC 0.19.0-2
  
  Steps to reproduce:
  
  I am using the command line pkcs11-tool to test the detection of the
  insertion/removal of the token.
  
  shell # pkcs11-tool --test-hotplug
  Testing card detection using C_GetSlotList()
- Please press return to continue, x to exit:                      <==== Token 
inserted 
+ Please press return to continue, x to exit:                      <==== Token 
inserted
  Available slots:
  Slot 0 (0x0): Yubico Yubikey NEO OTP+U2F+CCID 00 00
-   token label        : rfalco
-   token manufacturer : piv_II
-   token model        : PKCS#15 emulated
-   token flags        : login required, rng, token initialized, PIN initialized
-   hardware version   : 0.0
-   firmware version   : 0.0
-   serial num         : 792c2fc3fd36ad4d
-   pin min/max        : 4/8
- 
+   token label        : xxxxx
+   token manufacturer : piv_II
+   token model        : PKCS#15 emulated
+   token flags        : login required, rng, token initialized, PIN initialized
+   hardware version   : 0.0
+   firmware version   : 0.0
+   serial num         : xxxxxxxxx
+   pin min/max        : 4/8
  
  Please press return to continue, x to exit:                      <==== Token 
removed
  Available slots:
  Slot 0 (0x0): (GetSlotInfo failed, CKR_GENERAL_ERROR)
  
- Please press return to continue, x to exit: 
+ Please press return to continue, x to exit:
  Available slots:
  Slot 0 (0x0): (GetSlotInfo failed, CKR_GENERAL_ERROR)
  
  Please press return to continue, x to exit:                      <==== Still 
detecting a token despite token being removed
  Available slots:
  Slot 0 (0x0): Yubico Yubikey NEO OTP+U2F+CCID 00 00
-   token label        : rfalco
-   token manufacturer : piv_II
-   token model        : PKCS#15 emulated
-   token flags        : login required, rng, token initialized, PIN initialized
-   hardware version   : 0.0
-   firmware version   : 0.0
-   serial num         : 792c2fc3fd36ad4d
-   pin min/max        : 4/8
- 
+   token label        : xxxxx
+   token manufacturer : piv_II
+   token model        : PKCS#15 emulated
+   token flags        : login required, rng, token initialized, PIN initialized
+   hardware version   : 0.0
+   firmware version   : 0.0
+   serial num         : xxxxxxxxxxx
+   pin min/max        : 4/8
  
  Fix
  A bug was opened with OpenSC and is now fixed as of version 0.20.0
  https://github.com/OpenSC/OpenSC/issues/1706
  
  Would it be possible to upgrade OpenSC to 0.20.0 in the next version?

** Package changed: network-manager (Ubuntu) => opensc (Ubuntu)

** Also affects: pam-pkcs11 (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1857912

Title:
  OpenSC pkcs11_eventmgr doesn't detect token removal

Status in opensc package in Ubuntu:
  New
Status in pam-pkcs11 package in Ubuntu:
  New

Bug description:
  Apparently there is a bug in the OpenSC PKCS11 library and keep
  returning the token even after it has been removed.

  Environment:
  Arch x86_64
  Ubuntu 19.10 (eoan)
  OpenSC 0.19.0-2

  Steps to reproduce:

  I am using the command line pkcs11-tool to test the detection of the
  insertion/removal of the token.

  shell # pkcs11-tool --test-hotplug
  Testing card detection using C_GetSlotList()
  Please press return to continue, x to exit:                      <==== Token 
inserted
  Available slots:
  Slot 0 (0x0): Yubico Yubikey NEO OTP+U2F+CCID 00 00
    token label        : xxxxx
    token manufacturer : piv_II
    token model        : PKCS#15 emulated
    token flags        : login required, rng, token initialized, PIN initialized
    hardware version   : 0.0
    firmware version   : 0.0
    serial num         : xxxxxxxxx
    pin min/max        : 4/8

  Please press return to continue, x to exit:                      <==== Token 
removed
  Available slots:
  Slot 0 (0x0): (GetSlotInfo failed, CKR_GENERAL_ERROR)

  Please press return to continue, x to exit:
  Available slots:
  Slot 0 (0x0): (GetSlotInfo failed, CKR_GENERAL_ERROR)

  Please press return to continue, x to exit:                      <==== Still 
detecting a token despite token being removed
  Available slots:
  Slot 0 (0x0): Yubico Yubikey NEO OTP+U2F+CCID 00 00
    token label        : xxxxx
    token manufacturer : piv_II
    token model        : PKCS#15 emulated
    token flags        : login required, rng, token initialized, PIN initialized
    hardware version   : 0.0
    firmware version   : 0.0
    serial num         : xxxxxxxxxxx
    pin min/max        : 4/8

  Fix
  A bug was opened with OpenSC and is now fixed as of version 0.20.0
  https://github.com/OpenSC/OpenSC/issues/1706

  Would it be possible to upgrade OpenSC to 0.20.0 in the next version?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/opensc/+bug/1857912/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to