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 1954422 - [34 Regression] libgcrypt-1.9.2-2.fc34.x86_64 lost CET protection
Summary: [34 Regression] libgcrypt-1.9.2-2.fc34.x86_64 lost CET protection
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libgcrypt
Version: 9.0
Hardware: x86_64
OS: Linux
medium
unspecified
Target Milestone: beta
: 9.0 Beta
Assignee: Jakub Jelen
QA Contact: Alexander Sosedkin
URL:
Whiteboard:
Depends On: 1954049
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-28 07:16 UTC by Jakub Jelen
Modified: 2021-12-07 21:28 UTC (History)
8 users (show)

Fixed In Version: libgcrypt-1.9.3-2.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 1954049
Environment:
Last Closed: 2021-12-07 21:24:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
A patch (820 bytes, patch)
2021-04-28 15:15 UTC, H.J. Lu
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CRYPTO-5668 0 None None None 2021-12-02 14:43:32 UTC

Description Jakub Jelen 2021-04-28 07:16:09 UTC
We need to fix this also in RHEL9 as it has the same version as Fedora now. Morover, this seems super-easy to automatically check in gating tests to avoid the same issue in the future.

+++ This bug was initially created as a clone of Bug #1954049 +++

[root@gnu-tgl-1 hjl]# rpm -qf /lib64/libgcrypt.so.20     
libgcrypt-1.9.2-2.fc34.x86_64
[root@gnu-tgl-1 hjl]# readelf -n /lib64/libgcrypt.so.20 | grep feature
[root@gnu-tgl-1 hjl]# 

[hjl@gnu-efi-2 ~]$ rpm -qf /lib64/libgcrypt.so.20    
libgcrypt-1.8.7-1.fc33.x86_64
[hjl@gnu-efi-2 ~]$ readelf -n /lib64/libgcrypt.so.20 | grep feature 
	x86 feature: IBT, SHSTK
[hjl@gnu-efi-2 ~]$

--- Additional comment from Jakub Jelen on 2021-04-27 16:11:24 CEST ---

Hi, do you have some hints where do these come from (compiler flags, configuration?)?

Does it work with new 1.9.3 version?

https://bodhi.fedoraproject.org/updates/FEDORA-2021-54a91de592

--- Additional comment from Jakub Jelen on 2021-04-27 16:31:22 CEST ---

ok, the version 1.9.3 is not any better:

[root@fedora34 ~]# readelf -n /lib64/libgcrypt.so.20 | grep feature

Probably this?

https://src.fedoraproject.org/rpms/libgcrypt/c/8c18517a2519c8acbf705612db701c063990ff59

I read it as it is available in master already. Unfortunately, there is no better reference. Let me check.

--- Additional comment from H.J. Lu on 2021-04-27 16:41:14 CEST ---

Let me take a look to fix it.

--- Additional comment from H.J. Lu on 2021-04-27 18:52:41 CEST ---

This patch:

https://gitlab.com/cet-software/libgcrypt/-/commit/b04c0a86b19856071c29d2a6285f3240c606ee7a

should work.

--- Additional comment from Jakub Jelen on 2021-04-27 20:39:31 CEST ---

Thank you. I verified that the local build has the expected flags.

Did you submit the patch upstream already or should I do that?

--- Additional comment from H.J. Lu on 2021-04-27 21:47:35 CEST ---

(In reply to Jakub Jelen from comment #5)
> Thank you. I verified that the local build has the expected flags.
> 
> Did you submit the patch upstream already or should I do that?

https://lists.gnupg.org/pipermail/gcrypt-devel/2021-April/005147.html

Comment 1 H.J. Lu 2021-04-28 15:15:01 UTC
Created attachment 1776775 [details]
A patch

This is the patch I am using to catch CET regressions.

Comment 3 Jakub Jelen 2021-04-28 17:23:29 UTC
(In reply to H.J. Lu from comment #1)
> Created attachment 1776775 [details]
> A patch
> 
> This is the patch I am using to catch CET regressions.

Thanks. Does this have some side effects aside of failing when the CET is not properly applied? Would it make sense to Fedora to integrate it into the RPM CFLAGS globally? Or it makes sense only for the "important" packages?

Comment 4 H.J. Lu 2021-04-28 17:34:07 UTC
(In reply to Jakub Jelen from comment #3)
> (In reply to H.J. Lu from comment #1)
> > Created attachment 1776775 [details]
> > A patch
> > 
> > This is the patch I am using to catch CET regressions.
> 
> Thanks. Does this have some side effects aside of failing when the CET is

If CET isn't properly enabled in the final linker output, the link will fail.

> not properly applied? Would it make sense to Fedora to integrate it into the
> RPM CFLAGS globally? Or it makes sense only for the "important" packages?

It should be used to create packages which have been known to be CET enabled.


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