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 1868996

Summary: ssh-agent segfaults during ssh-add -s pkcs11
Product: Red Hat Enterprise Linux 8 Reporter: Orion Poplawski <orion>
Component: opensshAssignee: Dmitry Belyavskiy <dbelyavs>
Status: CLOSED ERRATA QA Contact: Marek Havrila <mhavrila>
Severity: low Docs Contact:
Priority: low    
Version: 8.2CC: asosedki, dbelyavs, jjelen, mhavrila
Target Milestone: rcKeywords: Patch, Triaged
Target Release: 8.4Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openssh-8.0p1-7.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:32:04 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 Orion Poplawski 2020-08-15 01:42:16 UTC
Description of problem:

Insert yubikey 5C

$ eval $(ssh-agent)
$ ssh-add -l pkcs11
Enter passphrase for PKCS#11: 

ssh-agent is now dead

Version-Release number of selected component (if applicable):
openssh-8.0p1-4.el8_1.x86_64


How reproducible:
Everytime

Program received signal SIGSEGV, Segmentation fault.
0x000055cda64bd28d in pkcs11_uri_cleanup (pkcs11=0x0) at ssh-pkcs11-uri.c:252
252             free(pkcs11->id);

so pkcs11 is NULL here which doesn't seem good.

Comment 1 Orion Poplawski 2020-08-15 02:42:24 UTC
Well, I guess this isn't a big deal since pkcs11 isn't a valid URL - but it definitely shouldn't segfault.

Comment 2 Jakub Jelen 2020-08-17 07:38:27 UTC
Thank you for the report. Simple checking for null in pkcs11_uri_cleanup() handles this case. I pushed update to fedora [1] and I will fix it in RHEL as we will do update.


[1] https://src.fedoraproject.org/rpms/openssh/c/4c85eb3

Comment 14 errata-xmlrpc 2021-11-09 19:32:04 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 (Moderate: openssh security 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/RHSA-2021:4368