Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1001123

Summary: Disable or remove device ccid-card-emulated
Product: Red Hat Enterprise Linux 7 Reporter: Markus Armbruster <armbru>
Component: qemu-kvmAssignee: Markus Armbruster <armbru>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: acathrow, chayang, juzhang, knoel, mazhang, michen, pbonzini, sluo, virt-maint
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-15.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:55:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1001216    
Bug Blocks: 720747    

Description Markus Armbruster 2013-08-26 14:19:23 UTC
Device ccid-card-emulated should be removed or made unavailable with -device / device_add, because we won't support it.

How reproducible:
Always

Steps to Reproduce:
1. qemu-kvm -nodefaults -display none -monitor stdio -S -usb -device usb-ccid -device ccid-card-emulated,backend=nss-emulated

Actual results:
-device ccid-card-emulated is accepted

Expected results:
-device ccid-card-emulated is rejected, just like -device nonexistant

Comment 2 Markus Armbruster 2013-08-26 14:23:13 UTC
"configure --disable-smartcard-nss" should do the trick.

Comment 3 Miroslav Rezanina 2013-08-27 13:06:26 UTC
(In reply to Markus Armbruster from comment #0)
> Device ccid-card-emulated should be removed or made unavailable with -device
> / device_add, because we won't support it.
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1. qemu-kvm -nodefaults -display none -monitor stdio -S -usb -device
> usb-ccid -device ccid-card-emulated,backend=nss-emulated
> 
> Actual results:
> -device ccid-card-emulated is accepted
> 
> Expected results:
> -device ccid-card-emulated is rejected, just like -device nonexistant

Is this really true? Marc-André Lureau stated following (can't find mail link in archive, but it's from March 25,  RHEL 7 qemu-kvm configure):

"libcacard rely on NSS for loading certificates from PKCS11 modules and
other functions. Without NSS, there is no card emulation compiled in
atm. We need --enable-smartcard-nss."

Comment 4 Markus Armbruster 2013-08-27 13:47:49 UTC
Well, Alon told me we can --disable-smartcard-nss.  Suggest to post the obvious patch, cc: both.

Comment 5 Miroslav Rezanina 2013-08-30 08:06:58 UTC
Using --disable-smartcard-nss will disable libcacard build so option can't be used. This confirm Marc-Andre's statement that device is required for libcacard build.

Comment 6 Markus Armbruster 2013-09-10 06:47:59 UTC
The device needs to go one way or another.  Since "configure --disable-smartcard-nss" is not usable, we need to cut it some other way.

Comment 7 Paolo Bonzini 2013-09-18 13:43:10 UTC
It looks like we support exactly the same thing (and the same code) via SPICE:

https://blogs.gnome.org/halfline/2013/09/08/another-smartcard-post/

Do we really need to disable this?

Comment 8 Markus Armbruster 2013-09-18 14:28:29 UTC
Denying users the possibility to conjure up a purely virtual smartcard
device isn't the point of this bug.  Its point is to get rid of some
qemu-kvm code we don't want to test and support.  If users can get the
functionality even without said code (as the post you quoted seems to
suggest), then that's another argument for removing the code.

Comment 9 Paolo Bonzini 2013-09-20 13:53:53 UTC
That actually makes sense, I must admit.

Comment 10 Miroslav Rezanina 2013-11-07 08:23:05 UTC
Fix included in qemu-kvm-1.5.3-15.el7

Comment 12 Chao Yang 2013-12-24 08:02:05 UTC
Reproduced on qemu-kvm-1.5.3-14.el7.x86_64.

Steps:

1. launch a guest with "-chardev spicevmc,name=smartcard,id=ccid -device usb-ccid -device ccid-card-emulated,backend=certificates,cert1=cert1,cert2=cert2,cert3=cert3 " through:

2. shutdown guest
3. re-launch without "-device ccid-card-emulated,backend=certificates,cert1=cert1,cert2=cert2,cert3=cert3 " in cli

4. hot plug ccid-card-emulated

Actual Result:

a. With qemu-kvm-1.5.3-14.el7.x86_64, there was ccid-card-emuated option from output of /usr/libexec/qemu-kvm -device ?

b. guest could be launched after step 1

c. ccid-card-emulated could be hot plugged: 
{"execute":"device_add","arguments":{"driver":"ccid-card-emulated","backend":"certificates","cert1":"cert1","cert2":"cert2","cert3":"cert3"}}
{"return": {}}

------------------------------
Verified with qemu-kvm-1.5.3-30.el7.x86_64.rpm.

a. ccid-card-emuated option has been removed from output of /usr/libexec/qemu-kvm -device ?

b. after step 1, qemu-kvm quit on:
(qemu) device_add ccid-card-emulated,backend=certificates,cert1=cert1,cert2=cert2,cert3=cert3
Parameter 'driver' expects device type

c. after step 4, it complains: 
{"execute":"device_add","arguments":{"driver":"ccid-card-emulated","backend":"certificates","cert1":"cert1","cert2":"cert2","cert3":"cert3"}}
{"error": {"class": "GenericError", "desc": "Parameter 'driver' expects device type"}}



As per above, this issue has been fixed.

Comment 14 Ludek Smid 2014-06-13 12:55:03 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.