Bug 801854 - spicec crashes (segfaults) when smartcard reader is plugged while guest expects smartcard auth
spicec crashes (segfaults) when smartcard reader is plugged while guest expec...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: spice-client (Show other bugs)
6.3
Unspecified Linux
medium Severity medium
: rc
: 6.3
Assigned To: Alon Levy
Desktop QE
:
Depends On: 802435 806038 811314 975600
Blocks: 840699
  Show dependency treegraph
 
Reported: 2012-03-09 11:32 EST by David Jaša
Modified: 2013-06-18 17:57 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 802435 (view as bug list)
Environment:
Last Closed: 2012-08-01 09:44:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backtrace (66.47 KB, text/plain)
2012-03-09 11:32 EST, David Jaša
no flags Details
pcscd debug output from card insertion to client segfault (17.67 KB, text/plain)
2012-03-09 11:43 EST, David Jaša
no flags Details

  None (edit)
Description David Jaša 2012-03-09 11:32:28 EST
Created attachment 568960 [details]
backtrace

Description of problem:
spicec crashes (segfaults) when smartcard is plugged while guest expects smartcard auth

Version-Release number of selected component (if applicable):
spice-client-0.8.2-13.el6.x86_64
coolkey-1.1.0-19.el6.x86_64
pcsc-lite-1.5.2-6.el6.x86_64

How reproducible:
always

Steps to Reproduce:
0. unplug the reader from the client
1. boot up the RHEL guest to smartcard-enabled gdm
2. (optional: select "smartcard authentication")
3. run spicec --smartcard <other opts>
4. plug the smartcard reader
  
Actual results:
spicec crashes with segmentation fault

Expected results:
spicec continues running

Additional info:
  * does not happen when sc reader is already plugged in at the launch of spicec
  * messages in log (with DEBUG level) from reader insertion to the crash:
1331309793 INFO [23904:23916] SmartCardChannel::cac_card_events_thread_main: VEVENT_READER_INSERT
1331309793 INFO [23904:23904] SmartCardChannel::add_unallocated_reader: adding unallocated reader 0x960dc0
  * log messages when reader is plugged at spicec launch and spiced does
    not crash:
1331310580 INFO [2326:2338] SmartCardChannel::cac_card_events_thread_main: VEVENT_READER_INSERT
1331310580 INFO [2326:2326] SmartCardChannel::add_unallocated_reader: adding unallocated reader 0x28bae60
1331310580 INFO [2326:2338] SmartCardChannel::cac_card_events_thread_main: VEVENT_CARD_INSERT
1331310580 INFO [2326:2326] SmartCardChannel::add_reader: adding 0x28bae60->0
   * log messages when user removes and re-inserts smartcard:
1331310684 INFO [2326:2338] SmartCardChannel::cac_card_events_thread_main: VEVENT_CARD_REMOVE
1331310691 INFO [2326:2338] SmartCardChannel::cac_card_events_thread_main: VEVENT_CARD_INSERT
1331310692 DEBUG [2326:2326] SmartCardChannel::send_atr: ATR: 
1331310692 DEBUG [2326:2326] VSCMessageEvent::response:   31: recv APDU: 
1331310692 DEBUG [2326:2326] VSCMessageEvent::response:  sent APDU:
Comment 1 David Jaša 2012-03-09 11:43:29 EST
Created attachment 568961 [details]
pcscd debug output from card insertion to client segfault
Comment 3 Alon Levy 2012-04-18 09:54:00 EDT
So the issue with this bug:
 - there is an underlying problem that is not spicec related (even though the direct reason for a segfault of course is). See bugs:
 * bug 802435 . libcacard, POST, pushed upstream (no component yet, won't help without coolkey updated)
 * bug 806038, coolkey. patches attached, but ASSIGNED due to regression.
 * bug 811314, nss, fix by rrelyea for a regression caused by the coolkey fix.

I'll fix the segfault, but that would still leave us with a "smartcard not working if reader plugged in after spicec started" just like the remote-viewer cloned bug, now libcacard (802435)

For an explanation of the actual problem see bug 802435 comment 5.

Alon
Comment 4 David Blechter 2012-04-18 10:11:46 EDT
moving to 6.4, depend on 802435
Comment 5 Alon Levy 2012-04-18 10:20:54 EDT
Adding dependency on 806038, 811314
Comment 8 Marian Krcmarik 2012-08-01 09:44:11 EDT
Closing as WONTFIX, spice-client was replaced by virt-viewer which is now supported client. This bug was not reproducible with virt-viewer, If you can reproduce with remote-viewer, please file a bug for virt-viewer. Thanks.

Note You need to log in before you can comment on or make changes to this bug.