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 2068091 - pkcsconf -t failed with Segmentation fault (core dumped) in FIPS mode
Summary: pkcsconf -t failed with Segmentation fault (core dumped) in FIPS mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: opencryptoki
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Than Ngo
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-24 12:57 UTC by Filip Dvorak
Modified: 2022-11-15 13:03 UTC (History)
1 user (show)

Fixed In Version: opencryptoki-3.18.0-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:16:10 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-116682 0 None None None 2022-03-24 13:18:20 UTC
Red Hat Product Errata RHBA-2022:8307 0 None None None 2022-11-15 11:16:18 UTC

Description Filip Dvorak 2022-03-24 12:57:40 UTC
Description of problem:
pkcsconf -t failed with Segmentation fault (core dumped) in FIPS mode

Version-Release number of selected component (if applicable):
opencryptoki-3.17.0-5.el9_0.x86_64
RHEL-9.0.0-20220322.0

How reproducible:


Steps to Reproduce:
1.usermod -aG pkcs11 root
2.systemctl start pkcsslotd
3.pkcsconf -t

Actual results:
...
C_GetSlotList returned 0 slots. Check that your tokens are installed correctly.
Segmentation fault (core dumped)
...

Expected results:
I am not sure if pkcsconf should work in FIPS but it should not fail with coredump (Segmentation fault)

Additional info:

(gdb) run -t
Starting program: /usr/sbin/pkcsconf -t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Invalid cast.
warning: Probes-based dynamic linker interface failed.
Reverting to original interface.
[New Thread 0x7ffff6e5e640 (LWP 7378)]
C_GetSlotList returned 0 slots. Check that your tokens are installed correctly.

Thread 2 "pkcsconf" received signal SIG32, Real-time event 32.
[Switching to Thread 0x7ffff6e5e640 (LWP 7378)]
start_thread (arg=<optimized out>) at pthread_create.c:429
429	      LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg);

Comment 1 Filip Dvorak 2022-03-24 13:08:47 UTC
it works on:

- RHEL-9.0.0-20211108.6-Beta (FIPS)
opensc-0.22.0-1.el9.x86_64
opencryptoki-3.16.0-12.el9.x86_64
openssl-3.0.0-0.beta2.7.el9.x86_64

# usermod -aG pkcs11 root
# systemctl start pkcsslotd
# pkcsconf -t
Token #3 Info:
	Label: softtok                         
	Manufacturer: IBM                             
...

- RHEL8.5 (FIPS)
opensc-0.20.0-4.el8.x86_64
opencryptoki-3.16.0-5.el8.x86_64
openssl-1.1.1k-4.el8.x86_64

Comment 2 Than Ngo 2022-03-24 13:47:35 UTC
(In reply to Filip Dvorak from comment #1)
> it works on:
> 
> - RHEL-9.0.0-20211108.6-Beta (FIPS)
> opensc-0.22.0-1.el9.x86_64
> opencryptoki-3.16.0-12.el9.x86_64
> openssl-3.0.0-0.beta2.7.el9.x86_64
> 
> # usermod -aG pkcs11 root
> # systemctl start pkcsslotd
> # pkcsconf -t
> Token #3 Info:
> 	Label: softtok                         
> 	Manufacturer: IBM                             
> ...
> 
> - RHEL8.5 (FIPS)
> opensc-0.20.0-4.el8.x86_64
> opencryptoki-3.16.0-5.el8.x86_64
> openssl-1.1.1k-4.el8.x86_64

Hi Filip,

could you please test opencryptoki-3.17.0-3.el8 on rhel-8.6 in FIPS mode if it works?
Thank you!

Comment 3 Karel Srot 2022-03-25 09:06:53 UTC
FTR, on RHEL-8.6 pkcsconf -t works but token initialization fails with an error:

 :: [ 10:34:59 ] :: [  BEGIN   ] :: Running 'su user25428 -c 'source  /home/ksrot/devel/src.fedoraproject.org/opencryptoki/Library/token-manipulation/lib.sh && pkcsInitToken 3''
 SLOT: 3
 LABEL: softtok
 pkcsInitToken: Initialize token
 spawn /usr/sbin/pkcsconf -c 3 -I
 Enter the SO PIN: 
 Enter a unique token label: softtok                         
 pkcsInitToken: Changing SO PIN
 spawn /usr/sbin/pkcsconf -c 3 -P
 Enter the SO PIN: 
 Enter the new SO PIN: 
 Re-enter the new SO PIN: 
 Error logging in: 0x6 (CKR_FUNCTION_FAILED)
 Error: pkcsInitToken: Failed to change SO PIN

https://beaker.engineering.redhat.com/jobs/6431903

Comment 12 errata-xmlrpc 2022-11-15 11:16:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (opencryptoki bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8307


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