** Description changed:

+ 
+ [DESCRIPTION]
+ 
+ When hotplugging a composite USB device that expose multiple interfaces
+ (such as a Yubikey NEO or Yubikey 4), libccid does not correctly de-
+ initialize the USB library when it skips over the non-CCID interface.
+ 
+ This subsequently results in pcscd (or, presumably, anything that loads
+ libccid, though I don't think anything else does) either using 100% CPU
+ or segfaulting when the device is unplugged.
+ 
+ This seems worthy of an SRU as it is an easily reproducible bug with a
+ simple, targeted fix.
+ 
+ [TEST CASE]
+ 
+ 1. Make sure pcscd is running (sudo systemctl start pcscd; possibly sudo 
systemctl restart pcscd if a potentially fixed package has just been installed)
+ 2. Plug and then unplug a composite USB device that includes a CCID interface 
(such as a Yubikey NEO)
+ 3. Observe that pcscd has crashed with a segfault (sudo systemctl status 
pcscd)
+ 
+ [REGRESSION POTENTIAL]
+ 
+ The patch is quite narrow, and thus the potential for regression should
+ be limited. The new code adds calls to close_libusb_if_needed, which is
+ already written to be fairly conservative.
+ 
+ The worst case here is likely an unexpected call to libusb_exit, which
+ could cause libusb to get into an inconsistent state. However, in
+ practice the call seems quite safe, and the likelihood of regression
+ low.
+ 
+ 
+ ======
+ Original bug description:
+ 
  In xenial, pcscd CPU utilization occasionally goes haywire:
  
-   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND   
                                                                                
                                                    
- 27404 root      20   0  384264   4992   2228 S 100.3  0.0  75:39.03 
/usr/sbin/pcscd --foreground --auto-exit                                        
                                                              
+   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
+ 27404 root      20   0  384264   4992   2228 S 100.3  0.0  75:39.03 
/usr/sbin/pcscd --foreground --auto-exit
  
  I get this about once a day since installing xenial. I can't quite
  connect it to any specific event on the system, it just seems to happen
  sporadically -- fan turns on, I run top, and there it is again.
  
  Never had this issue on same hardware incl. smartcard with trusty.
  
  I wonder if it might be this? https://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=718473

** Description changed:

- 
- [DESCRIPTION]
+ [Impact]
  
  When hotplugging a composite USB device that expose multiple interfaces
  (such as a Yubikey NEO or Yubikey 4), libccid does not correctly de-
  initialize the USB library when it skips over the non-CCID interface.
  
  This subsequently results in pcscd (or, presumably, anything that loads
  libccid, though I don't think anything else does) either using 100% CPU
  or segfaulting when the device is unplugged.
  
  This seems worthy of an SRU as it is an easily reproducible bug with a
  simple, targeted fix.
  
- [TEST CASE]
+ [Test Case]
  
  1. Make sure pcscd is running (sudo systemctl start pcscd; possibly sudo 
systemctl restart pcscd if a potentially fixed package has just been installed)
  2. Plug and then unplug a composite USB device that includes a CCID interface 
(such as a Yubikey NEO)
  3. Observe that pcscd has crashed with a segfault (sudo systemctl status 
pcscd)
  
- [REGRESSION POTENTIAL]
+ [Regression Potential]
  
  The patch is quite narrow, and thus the potential for regression should
  be limited. The new code adds calls to close_libusb_if_needed, which is
  already written to be fairly conservative.
  
  The worst case here is likely an unexpected call to libusb_exit, which
  could cause libusb to get into an inconsistent state. However, in
  practice the call seems quite safe, and the likelihood of regression
  low.
- 
  
  ======
  Original bug description:
  
  In xenial, pcscd CPU utilization occasionally goes haywire:
  
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  27404 root      20   0  384264   4992   2228 S 100.3  0.0  75:39.03 
/usr/sbin/pcscd --foreground --auto-exit
  
  I get this about once a day since installing xenial. I can't quite
  connect it to any specific event on the system, it just seems to happen
  sporadically -- fan turns on, I run top, and there it is again.
  
  Never had this issue on same hardware incl. smartcard with trusty.
  
  I wonder if it might be this? https://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=718473

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to pcsc-lite in Ubuntu.
https://bugs.launchpad.net/bugs/1551897

Title:
  Excessive CPU utilization

Status in ccid package in Ubuntu:
  Fix Released
Status in pcsc-lite package in Ubuntu:
  Invalid
Status in ccid source package in Xenial:
  In Progress
Status in pcsc-lite source package in Xenial:
  Invalid
Status in pcsc-lite package in Debian:
  Fix Released

Bug description:
  [Impact]

  When hotplugging a composite USB device that expose multiple
  interfaces (such as a Yubikey NEO or Yubikey 4), libccid does not
  correctly de-initialize the USB library when it skips over the non-
  CCID interface.

  This subsequently results in pcscd (or, presumably, anything that
  loads libccid, though I don't think anything else does) either using
  100% CPU or segfaulting when the device is unplugged.

  This seems worthy of an SRU as it is an easily reproducible bug with a
  simple, targeted fix.

  [Test Case]

  1. Make sure pcscd is running (sudo systemctl start pcscd; possibly sudo 
systemctl restart pcscd if a potentially fixed package has just been installed)
  2. Plug and then unplug a composite USB device that includes a CCID interface 
(such as a Yubikey NEO)
  3. Observe that pcscd has crashed with a segfault (sudo systemctl status 
pcscd)

  [Regression Potential]

  The patch is quite narrow, and thus the potential for regression
  should be limited. The new code adds calls to close_libusb_if_needed,
  which is already written to be fairly conservative.

  The worst case here is likely an unexpected call to libusb_exit, which
  could cause libusb to get into an inconsistent state. However, in
  practice the call seems quite safe, and the likelihood of regression
  low.

  ======
  Original bug description:

  In xenial, pcscd CPU utilization occasionally goes haywire:

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  27404 root      20   0  384264   4992   2228 S 100.3  0.0  75:39.03 
/usr/sbin/pcscd --foreground --auto-exit

  I get this about once a day since installing xenial. I can't quite
  connect it to any specific event on the system, it just seems to
  happen sporadically -- fan turns on, I run top, and there it is again.

  Never had this issue on same hardware incl. smartcard with trusty.

  I wonder if it might be this? https://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=718473

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

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

Reply via email to