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 2152618 - Test for available issuercert before creating CA
Summary: Test for available issuercert before creating CA
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: swtpm
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 9.2
Assignee: Marc-Andre Lureau
QA Contact: Yanqiu Zhang
URL:
Whiteboard:
Depends On: 2092944 2100508
Blocks: 2108470 2109987 2152916 2152917
TreeView+ depends on / blocked
 
Reported: 2022-12-12 14:03 UTC by John Ferlan
Modified: 2023-05-09 09:05 UTC (History)
9 users (show)

Fixed In Version: swtpm-0.8.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2100508
: 2152916 2152917 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:47:50 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-141905 0 None None None 2022-12-12 14:15:46 UTC
Red Hat Product Errata RHBA-2023:2348 0 None None None 2023-05-09 07:48:08 UTC

Description John Ferlan 2022-12-12 14:03:51 UTC
+++ This bug was initially created as a clone of Bug #2100508 +++

Description of problem:
We (assisted-installer team which are related to OpenShift product) are currently experiencing some problems when trying to use swtpm version 0.7.0 in our tests. The bug is documented better in this GitHub issue: https://github.com/stefanberger/swtpm/issues/644

We would like RHEL 8.6 to have the updated patch version 0.7.1 of swtpm, because it contains the bug-fix for that problem.

Version-Release number of selected component (if applicable):
swtpm/swtpm-tools/swtpm-libs 0.7.0

How reproducible:
The original bug is a race-condition, affecting around 60% of selected jobs.

--- Additional comment from Nir Magnezi on 2022-07-11 09:07:35 UTC ---

Hi Danilo,

Any chance this can get a priority? it is impacting our CI:
https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-assisted-test-infra-release-ocm-2.5-e2e-metal-assisted-tpmv2-periodic/1546312689087680512

--- Additional comment from Danilo Cesar Lemes de Paula on 2022-07-18 17:31:27 UTC ---

(In reply to Nir Magnezi from comment #1)
> Hi Danilo,
> 
> Any chance this can get a priority? it is impacting our CI:
> https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-
> openshift-assisted-test-infra-release-ocm-2.5-e2e-metal-assisted-tpmv2-
> periodic/1546312689087680512

Assigning to the right engineer so he can decide.

--- Additional comment from Marc-Andre Lureau on 2022-07-18 17:58:40 UTC ---

The patch looks safe enough to backport:
https://github.com/stefanberger/swtpm/commit/27d4c5d83ff014f3b08cb7fc8ffdbfc32306cfbb

Do we need it in 8.6z, or can we simply target 8.7?

--- Additional comment from Osher De Paz on 2022-07-18 18:10:45 UTC ---

For our team needs it's crucial to have it for 8.6 because that's the version our cloud provider and the QE machines are set on

--- Additional comment from Marc-Andre Lureau on 2022-07-18 18:34:56 UTC ---

please qa ack

--- Additional comment from John Ferlan on 2022-07-19 10:19:52 UTC ---

Set ITM=26 to get release+

--- Additional comment from John Ferlan on 2022-07-19 10:36:11 UTC ---

Whoops - wrong tab.  Let's use this as the y-stream bug and go through the proper z-stream cloning process.  

I also set the dependent product to make it clearer that this affects OpenShift as noted in the problem statement.

I have closed bug 2108470

--- Additional comment from RHEL Program Management on 2022-07-22 15:22:49 UTC ---

This BZ has been approved for cloning.

The BZ can be now cloned by everyone with the self-service cloning tool https://watson.engineering.redhat.com/rules

For more information regarding ZStream and cloning please visit https://docs.google.com/document/d/1yL8iTHjxyQ7sI-fC4PcPjpOOyfF5ECGnK-B7r_QRZm4/edit#

--- Additional comment from RHEL Program Management Team on 2022-07-22 15:55:23 UTC ---

This bug has been copied as 8.6.0 stream bug#2109987 and now must be resolved in the current update release, blocker flag set.

--- Additional comment from yanqzhan on 2022-07-25 08:00:29 UTC ---

Reproduce with swtpm-0.7.0-3.20211109gitb79fd91.module+el8.7.0+15743+c774064d.x86_64:
# rm -rf /var/lib/swtpm-localca/* ; for ((i = 0; i<200;i++)); do rm -rf /tmp/vtpm${i}; mkdir -p /tmp/vtpm${i}; swtpm_setup --tpm2 --tpmstate /tmp/vtpm${i} --create-ek-cert --create-platform-cert --pcr-banks sha256 2>&1 | grep -i read & done
[1] 104430
[2] 104434
[3] 104438
...
[200] 106130
# swtpm_localca exit with status 1: Need read rights on issuer certificate /var/lib/swtpm-localca/issuercert.pem for user root.
swtpm_localca exit with status 1: Need read rights on issuer certificate /var/lib/swtpm-localca/issuercert.pem for user root.
...

Verify with:
swtpm-0.7.0-4.20211109gitb79fd91.module+el8.7.0+15999+d24f860e.x86_64.rpm

# rm -rf /var/lib/swtpm-localca/* ; for ((i = 0; i<200;i++)); do rm -rf /tmp/vtpm${i}; mkdir -p /tmp/vtpm${i}; swtpm_setup --tpm2 --tpmstate /tmp/vtpm${i} --create-ek-cert --create-platform-cert --pcr-banks sha256 2>&1 | grep -i read & done
[1] 118044
[2] 118048
...
[200] 119748
#

--- Additional comment from errata-xmlrpc on 2022-08-05 07:54:14 UTC ---

This bug has been added to advisory RHEA-2022:92978 by Marc-Andre Lureau (mlureau)

--- Additional comment from errata-xmlrpc on 2022-11-08 00:20:31 UTC ---

Bug report changed to RELEASE_PENDING status by Errata System.
Advisory RHSA-2022:92978-06 has been changed to PUSH_READY status.
https://errata.devel.redhat.com/advisory/92978

--- Additional comment from errata-xmlrpc on 2022-11-08 09:20: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 (Low: virt:rhel and virt-devel:rhel security, 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/RHSA-2022:7472


+++++

Creating this clone in order to ensure backport of this patch into 9.0.z-stream in order to match the 9.0.z-stream bug 2109987

Comment 4 John Ferlan 2022-12-12 14:12:39 UTC
Requesting 9.0.z-stream in order to ensure the 8.6.z-stream resolved bug 2109987 does not cause a regression for any 9.0.z migration/upgrade

Comment 9 Yanqiu Zhang 2023-01-03 03:09:25 UTC
Tested with swtpm-0.8.0-1.el9.x86_64

# rm -rf /var/lib/swtpm-localca/* ; for ((i = 0; i<1000;i++)); do rm -rf /tmp/vtpm${i}; mkdir -p /tmp/vtpm${i}; swtpm_setup --tpm2 --tpmstate /tmp/vtpm${i} --create-ek-cert --create-platform-cert --pcr-banks sha256 2>&1 | grep -i read & done

(No such error: swtpm_localca exit with status 1: Need read rights on issuer certificate /var/lib/swtpm-localca/issuercert.pem for user root.)

Comment 13 Yanqiu Zhang 2023-01-10 09:01:48 UTC
Mark as verified per comment9 with a downstream pkg.

Comment 15 errata-xmlrpc 2023-05-09 07:47:50 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 (swtpm 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-2023:2348


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