Bug 1791906

Summary: With CET enabled: /lib64/libgcrypt.so.20: shadow stack isn't enabled: Invalid argument
Product: [Fedora] Fedora Reporter: H.J. Lu <hongjiu.lu>
Component: libgcryptAssignee: Tomas Mraz <tmraz>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: tmraz
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: libgcrypt-1.8.5-3.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-18 17:13:26 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:
Bug Depends On:    
Bug Blocks: 1802674    

Description H.J. Lu 2020-01-16 16:49:58 UTC
On CET machine, I got

Jan 07 13:44:23 gnu-tgl-1.sc.intel.com su[1687]: PAM unable to dlopen(/usr/lib64/security/pam_fprintd.so): /lib64/libgcrypt.so.20: shadow stack isn't enabled: Invalid argument

Comment 1 H.J. Lu 2020-01-16 20:33:06 UTC
hjl/cet/LIBGCRYPT-1.8-BRANCH and hjl/cet/master branches at

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

have patches to enable CET.  Can someone from Fedora work with me to upstream them?

Comment 2 Tomas Mraz 2020-01-21 16:15:13 UTC
Unfortunately I do not have much influence on what upstream accepts or not. I'd suggest opening a task on https://dev.gnupg.org/ with a pointer to your gitlab repository.

Comment 3 H.J. Lu 2020-01-22 22:40:03 UTC
(In reply to Tomas Mraz from comment #2)
> Unfortunately I do not have much influence on what upstream accepts or not.
> I'd suggest opening a task on https://dev.gnupg.org/ with a pointer to your
> gitlab repository.

My patches have been checked into master branch.  Will Fedora take master branch?

Comment 4 Tomas Mraz 2020-01-23 12:21:03 UTC
No, but I can try to backport them myself, or if you want to help, please provide a backported patch.

Comment 5 H.J. Lu 2020-01-23 12:55:10 UTC
(In reply to Tomas Mraz from comment #4)
> No, but I can try to backport them myself, or if you want to help, please
> provide a backported patch.

See:

https://gitlab.com/cet-software/libgcrypt/tree/hjl/cet/LIBGCRYPT-1.8-BRANCH

Comment 6 Tomas Mraz 2020-04-24 12:50:47 UTC
As I've backported some AES related improvements from master in rawhide build https://koji.fedoraproject.org/koji/buildinfo?buildID=1497377, it would be nice if you could please verify that I did not break the CET support with this backport.

Comment 7 H.J. Lu 2020-04-24 13:09:24 UTC
It is OK:

$ readelf -n libgcrypt.so.20 2>&1 | grep IBT
      Properties: x86 feature: IBT, SHSTK