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 2007751 - Openssl 3 migration
Summary: Openssl 3 migration
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: tpm2-pkcs11
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Štěpán Horáček
QA Contact: Vilém Maršík
URL:
Whiteboard:
Depends On:
Blocks: 1958021 2057561
TreeView+ depends on / blocked
 
Reported: 2021-09-24 18:24 UTC by Jerry Snitselaar
Modified: 2022-10-03 14:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2057561 (view as bug list)
Environment:
Last Closed: 2022-02-23 13:39:38 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-98173 0 None None None 2021-09-24 18:26:12 UTC

Description Jerry Snitselaar 2021-09-24 18:24:56 UTC
Description of problem: There is a merge request upstream for openssl 3 migration of tpm2-pkcs11. Once that is merged, rebase to that release, and drop
the work around patch suggested on the crypto mailing list.

https://github.com/tpm2-software/tpm2-pkcs11/pull/721

In the interim if that gets held up, a patch to replace the current work around
patch was suggested on the openssl 3 issue on tpm2-pkcs11 github:

# more tpm2-pkcs11-1.5.0-openssl3.patch
diff -ur tpm2-pkcs11-1.5.0/src/lib/ssl_util.c tpm2-pkcs11-1.5.0-new/src/lib/ssl_util.c
--- tpm2-pkcs11-1.5.0/src/lib/ssl_util.c	2020-11-03 17:36:45.000000000 -0700
+++ tpm2-pkcs11-1.5.0-new/src/lib/ssl_util.c	2021-09-16 12:13:59.304961786 -0700
@@ -486,11 +486,16 @@
         CK_BYTE_PTR digest, CK_ULONG digest_len,
         CK_BYTE_PTR signature, CK_ULONG signature_len) {

-    EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey);
+    const EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey);
     if (!eckey) {
         LOGE("Expected EC Key");
         return CKR_GENERAL_ERROR;
     }
+    EC_KEY *eckey_local = EC_KEY_dup(eckey);
+    if (!eckey_local) {
+        LOGE("Expected EC Key");
+        return CKR_GENERAL_ERROR;
+    }

     /*
      * OpenSSL expects ASN1 framed signatures, PKCS11 does flate
@@ -505,7 +510,8 @@
         return rv;
     }

-    int rc = ECDSA_do_verify(digest, digest_len, ossl_sig, eckey);
+    int rc = ECDSA_do_verify(digest, digest_len, ossl_sig, eckey_local);
+    EC_KEY_free(eckey_local);
     if (rc < 0) {
         ECDSA_SIG_free(ossl_sig);
         SSL_UTIL_LOGE("ECDSA_do_verify failed");


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vilém Maršík 2021-09-30 23:18:08 UTC
Jerry, what testing is expected here?

Comment 2 Vilém Maršík 2021-09-30 23:20:33 UTC
s/Jerry/Stepan/

Comment 5 dbohanno 2022-02-23 13:39:38 UTC
Commit already in place for Openssl 3 migration: https://gitlab.com/redhat/centos-stream/rpms/tpm2-pkcs11/-/commit/1d77fcfa169dec91e3a89fb41fe7f1f0968070f0

This BZ will be cloned to track an upstream improvement to the TPM Openssl 3 for future releases.

-David


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