Bug 2176973
Summary: | evaluate CardOS support ( upstream 2591 ) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Marc Sauton <msauton> |
Component: | opensc | Assignee: | Jakub Jelen <jjelen> |
Status: | CLOSED MIGRATED | QA Contact: | BaseOS QE Security Team <qe-baseos-security> |
Severity: | medium | Docs Contact: | Mirek Jahoda <mjahoda> |
Priority: | medium | ||
Version: | 8.7 | CC: | jjelen, ldelouw, lkuprova, mjahoda, pjasbuti, ssorce |
Target Milestone: | rc | Keywords: | MigratedToJIRA, Triaged |
Target Release: | --- | Flags: | pm-rhel:
mirror+
|
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Known Issue | |
Doc Text: |
.OpenSC might not detect CardOS V5.3 card objects correctly
The OpenSC toolkit does not correctly read cache from different PKCS #15 file offsets used in some CardOS V5.3 cards. Consequently, OpenSC might not be able to list card objects and prevent using them from different applications.
To work around the problem, turn off file caching by setting the `use_file_caching = false` option in the `/etc/opensc.conf` file.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2023-09-15 15:34:58 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: |
Description
Marc Sauton
2023-03-09 20:04:46 UTC
Follow-up investigation shows in the debug log that the the issue is not a serial number, but the fact that the separate certificates are stored in single PKCS#15 object (for test card #1 in 3f0050154574) on different offsets and it looks like the file cache is not aware of the offsets so it overrides the single cache file with different content from different certificates causing invalid ASN.1 objects as a result. Investigating the issue further, it shows that the same issue happens also with the Fedora version (opensc 0.23.0) as well as the current master version. Simple fix for this is attached to the following upstream pr opened for comments: https://github.com/OpenSC/OpenSC/pull/2858 I see the customer case is still alive so I can provide a test build if the customer would like to test the fix. The workaround of disabling file cache makes the accessing card significantly slower (especially because of the amount of keys/certificates VW stores on the cards) so I would encourage to fix this for good in RHEL8 (and 9) and let the customer drop the workaround. (first run without file cache) real 0m1.691s (second run with file cache) real 0m0.185s One more thing, after installing the update, make sure to clear the cache by removing the files in the ~/.cache/opensc/ which might keep some broken cache files. Well done! Customer confirmed that the test build for RHEL 8 does fix the caching issue. Follow-up question: Since admins are typically not allowed to modify or delete files in user home directories, where cache files are located by default, is there a way for admins to trigger a cache invalidation? Thanks, Phil Thanks for checking! Looks like there is still some follow-up discussion in the upstream about the best solution as my initially proposed one has some concerns that it does not cover all the corner cases so I will likely send one more test build during next week. If the users have the opensc.conf on production systems with file cache disabled (and never had it enabled on that system), there should not be any cache to delete. This was mostly for the testing machines where the customer would be verifying the fix. Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug. This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there. Due to differences in account names between systems, some fields were not replicated. Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information. To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer. You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like: "Bugzilla Bug" = 1234567 In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information. |