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 2118601 - Token data are not accessible after upgrading from RHEL-8.7 to RHEL-9.0
Summary: Token data are not accessible after upgrading from RHEL-8.7 to RHEL-9.0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: opencryptoki
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Than Ngo
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks: 2089955 2127873 2127879
TreeView+ depends on / blocked
 
Reported: 2022-08-16 08:54 UTC by Karel Srot
Modified: 2022-09-19 13:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2127873 2127879 (view as bug list)
Environment:
Last Closed: 2022-09-19 13:24:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-131181 0 None None None 2022-08-16 09:06:46 UTC

Description Karel Srot 2022-08-16 08:54:54 UTC
Description of problem:

RHEL-8.7 contains opencryptoki opencryptoki-3.18.0 that uses tokversion = 3.12.
RHEL-9.0(.z) contains opencryptoki 3.17.0 that uses older configuration.
Since configuration files in both packages are not customized by a user, after a system upgrade the config file from 3.18 is replaced with a config file from 3.17.
See https://bugzilla.redhat.com/show_bug.cgi?id=2044179#c15 for additional details.

Version-Release number of selected component (if applicable):
opencryptoki-3.17.0-7.el9

How reproducible:
always

Steps to Reproduce:
1. Configure opencryptoki tokens on RHEL-8.7 and perform system upgrade to RHEL-9.0.
2.
3.

Actual results:
Tokens are not accessible due to incorrect config file.

Expected results:
Tokens are accessible

Comment 2 Karel Srot 2022-08-16 12:22:36 UTC
According to my testing the issue is not caused by the different config file itself. Even after restoring the configuration file token data cannot be accessed.

# pkcsconf -t
Token #3 Info:
	Label: softtok                         
	Manufacturer: IBM                             
	Model: Soft            
	Serial Number:                 
	Flags: 0x80004D (RNG|LOGIN_REQUIRED|USER_PIN_INITIALIZED|CLOCK_ON_TOKEN|SO_PIN_TO_BE_CHANGED)
	Sessions: 0/[effectively infinite]
	R/W Sessions: [information unavailable]/[effectively infinite]
	PIN Length: 4-8
	Public Memory: [information unavailable]/[information unavailable]
	Private Memory: [information unavailable]/[information unavailable]
	Hardware Version: 0.0
	Firmware Version: 0.0
	Time: 2022081608112700
# pkcs11-tool -v --module /usr/lib64/opencryptoki/libopencryptoki.so  --list-objects
Using slot 0 with a present token (0x3)

Expected:

# pkcs11-tool -v --module /usr/lib64/opencryptoki/libopencryptoki.so  --list-objects
Using slot 3 with a present token (0x3)
Public Key Object; RSA 3072 bits
  label:      id_rsa.pub
  ID:         4bb238050c2aaefbd01e0a983188b4198b2fb392
  Usage:      encrypt, verify, wrap
  Access:     local

Comment 4 Karel Srot 2022-08-25 11:54:41 UTC
Hello IBM,
may I kindly ask for a review? Is it expected that token data populated with opencryptoki v3.18 would be accessible by opencryptoki v3.17?

Comment 5 Than Ngo 2022-09-12 08:24:39 UTC
Hi Karel,

in my understanding the token data which is populated with opencryptoki v3.18 should be accessible by opencryptoki v3.17 if it is the same token data format.

Comment 7 Karel Srot 2022-09-14 09:20:34 UTC
Hi Than,
I have realized that I did a mistake during my testing and forgot to restart pkcsslotd after restoring opencryptoki.conf from backup. I have tested your scratch build and can confirm that it works well.


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