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 2133809 - OPENSSL_strcasecmp versioning
Summary: OPENSSL_strcasecmp versioning
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: openssl
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Dmitry Belyavskiy
QA Contact: Hubert Kario
URL:
Whiteboard:
Depends On: 2148469
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-11 13:18 UTC by Dmitry Belyavskiy
Modified: 2023-05-09 10:30 UTC (History)
4 users (show)

Fixed In Version: openssl-3.0.7-2.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:20:36 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CRYPTO-8519 0 None None None 2022-10-11 13:53:50 UTC
Red Hat Issue Tracker RHELPLAN-136128 0 None None None 2022-10-11 13:27:07 UTC
Red Hat Product Errata RHSA-2023:2523 0 None None None 2023-05-09 08:20:52 UTC

Description Dmitry Belyavskiy 2022-10-11 13:18:56 UTC
We backported OPENSSL_strcasecmp and OPENSSL_strncasecmp functions in our 3.0.1 version. Upstream has 3.0.3 version for both of these functions.

We need to provide both versions to allow 3rd-party applications to use both Red Hat and upstream versions of OpenSSL libraries without rebuild.

Comment 3 Florian Weimer 2022-11-21 19:04:50 UTC
Do you plan to rebase to OpenSSL 3.0.3, so that you get the full symbol set at this version? RPM dependency management only works at the symbol set level, so things go wrong if you backport only part of the set. (Perhaps you are lucky and it's just the pair, them there's no problem.)

I assume it's just an internal hack, so whatever works with our toolchain is acceptable. This appears to work

cat > t.c <<EOF
int __attribute__ ((symver ("OPENSSL_strcasecmp.1"),
                    symver ("OPENSSL_strcasecmp@@OPENSSL_3.0.3")))
OPENSSL_strcasecmp (const char *a, const char *b)
{
  return 0;
}
EOF
cat > t.lds <<EOF
OPENSSL_3.0.1 {
  global: OPENSSL_strcasecmp;
  local: *;
};
OPENSSL_3.0.3 {
  global: OPENSSL_strcasecmp;
  local: *;
} OPENSSL_3.0.1;
EOF
gcc -Wall -O2 -shared -fpic t.c -Wl,--version-script t.lds

@@ is the default version, @ is for compatibility with old binaries. It appears to work with gcc-11.3.1-2.1.el9.x86_64 and
binutils-2.35.2-24.el9.x86_64. It should be LTO-compatible, too. If there are issues, we can and should fix them on the toolchain side (symver had bugs before). Note that this is not suitable for upstream use because symver support in GCC and multi-.symver support in binutils are fairly recent.

If I remember the challenges from the OpenSSL 3 transitions correctly, your main issue will be integrating this approach into the OpenSSL build process and its idiosyncratic approach to symbol management. (The glibc build system has the same problem, although the details are of course very different.)

Comment 4 Dmitry Belyavskiy 2022-11-21 19:19:55 UTC
We plan to rebase to 3.0.7

Thank you very much!

Comment 8 Dmitry Belyavskiy 2022-11-25 17:46:49 UTC
To avoid the problems I met, I added -Wl,--allow-multiple-definition to compiler options. And, as FIPS module builds these functions itself, I wrapped the extra attributes with #ifndef FIPS_MODULE

Comment 16 errata-xmlrpc 2023-05-09 08:20:36 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: openssl security and bug fix 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-2023:2523


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