Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1993617

Summary: Enabling debugging in gssproxy results in crash
Product: Red Hat Enterprise Linux 9 Reporter: Phillip Jaenke <prj>
Component: gssproxyAssignee: Julien Rische <jrische>
Status: CLOSED CURRENTRELEASE QA Contact: anuja <amore>
Severity: high Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, fs-qe, jwboyer, plambri, redhat, rmarigny
Target Milestone: betaFlags: redhat: needinfo+
pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2061061 (view as bug list) Environment:
Last Closed: 2022-07-04 09:25:30 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: 2061061    

Description Phillip Jaenke 2021-08-14 15:33:42 UTC
Description of problem:
Running gssproxy with the '-i -d' (interactive, debug) arguments in a working krb5 environment (AD in my case) will instantly result in a segmentation fault, with 100% reproducibility. This is a known bug in gssproxy which has been resolved in a later version. The version currently being shipped is 0.8.0; this issue is fixed in 0.8.3 and later.
Upstream bugs and commits:
https://pagure.io/gssproxy/issue/256
https://pagure.io/gssproxy/c/3b77666

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

How reproducible:
100% reproducible.

Steps to Reproduce:
1. Configure system as a Kerberos client in a working environment (environment type doesn't matter.)
2. Install nfs-server and enable; optionally create an export
3. Disable SELinux fully
4. root@host# systemctl stop gssproxy; gssproxy -i -d

Actual results:
# gssproxy -i -d
[2021/08/14 14:47:51]: Debug Enabled (level: 1)
[2021/08/14 14:47:51]: Service: nfs-server, Keytab: /etc/krb5.keytab, Enctype: 23
[2021/08/14 14:47:51]: Service: nfs-client, Keytab: /etc/krb5.keytab, Enctype: 23
[2021/08/14 14:47:51]: Client [2021/08/14 14:47:51]: (/usr/sbin/gssproxy) [2021/08/14 14:47:51]:  connected (fd = 11)[2021/08/14 14:47:51]:  (pid = 2788) (uid = 0) (gid = 0)Segmentation fault (core dumped)


Expected results:
[2021/08/14 14:47:51]: Debug Enabled (level: 1)
... and normal debugging output

Additional info:
I was able to identify this as a known, already fixed bug with gdb. 

(gdb) file /usr/sbin/gssproxy
(gdb) run -i -d
Starting program: /usr/sbin/gssproxy -i -d
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[2021/08/14 15:05:36]: Debug Enabled (level: 1)
[2021/08/14 15:05:36]: Service: nfs-server, Keytab: /etc/krb5.keytab, Enctype: 23
[2021/08/14 15:05:36]: Service: nfs-client, Keytab: /etc/krb5.keytab, Enctype: 23
[New Thread 0x7ffff4378700 (LWP 60845)]
[New Thread 0x7ffff3b77700 (LWP 60846)]
[New Thread 0x7ffff3376700 (LWP 60847)]
[New Thread 0x7ffff2b75700 (LWP 60848)]
[New Thread 0x7ffff2374700 (LWP 60849)]
[2021/08/14 15:05:36]: Client [2021/08/14 15:05:36]: (/usr/sbin/gssproxy) [2021/08/14 15:05:36]:  connected (fd = 11)[2021/08/14 15:05:36]:  (pid = 60844) (uid = 0) (gid = 0)
Thread 1 "gssproxy" received signal SIGSEGV, Segmentation fault.
0x00007ffff686dfde in context_str () from /lib64/libselinux.so.1

Since this was already diagnosed and fixed by Simo, I believe the most appropriate fix is simply to update gssproxy to 0.8.3 or later.

Comment 1 Robbie Harwood 2021-08-16 19:26:34 UTC
Okay, but... the version of gssproxy in c9s is gssproxy-0.8.4-4.  It's been on 0.8.4-series since it branched.

So what are you actually running?

Comment 2 Marcin CIEŚLAK 2021-11-12 21:08:37 UTC
I just found the same problem trying to configure gssproxy with Apache httpd on RHEL 8.4

Trying to follow 

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/setting-apache-http-server_deploying-different-types-of-servers#assembly_configuring-kerberos-authentication-for-the-apache-http-web-server_setting-apache-http-server 

in a container running under podman (already had to add --cap-add=SYS_PTRACE since otherwise gssproxy fails with "Unexpected failure in realpath: 13 (Permission denied)"

Comment 3 Julien Rische 2022-02-15 10:51:50 UTC
I tried to reproduce this on a RHEL 8.4 VM following the mentioned documentation[1], and doing:

systemctl edit --full gssproxy
# set Type=simple
# set ExecStart=/usr/sbin/gssproxy -i -d
systemctl daemon-reload
systemctl restart gssproxy
journalctl -eu gssproxy

But debugging information was being logged as expected and no error was raised. Are you still able to reproduce this error?

[1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/setting-apache-http-server_deploying-different-types-of-servers#assembly_configuring-kerberos-authentication-for-the-apache-http-web-server_setting-apache-http-server

Comment 5 Marcin CIEŚLAK 2022-03-27 12:26:34 UTC
We have moved on and we no longer use gssproxy for anything. But the important factor in my case was to use the container, not the VM. Are you trying to reproduce it inside of a container?

Comment 6 Julien Rische 2022-04-14 07:57:57 UTC
I am not able to reproduce this error in a container, but the RHEL 8.5 container image I am using does not have systemd installed.

Do you remember what container image you were using?

Comment 7 Marcin CIEŚLAK 2022-04-14 12:18:06 UTC
So I did some archeology on this:

The used container was probably

$ podman image ls almalinux/8-init --no-trunc
REPOSITORY                                                            TAG         IMAGE ID                                                                 CREATED       SIZE
docker-virtual.production.artifactory.bshg.com:5000/almalinux/8-init  latest      sha256:a36e60a770df1b30a23339177160da41b85857e1ccc08cc24543bb90a5b9e289  6 months ago  212 MB

this was used to test the deployment some systemd-running software.

Comment 13 Julien Rische 2022-07-04 09:25:30 UTC
This issue was fixed in gssproxy 0.8.3[1], which was part of the initial release of RHEL9.0. The fix for RHEL8 is handled in bug 2061061.

[1] https://github.com/gssapi/gssproxy/commit/3b77666d463105fc485c0f269feaf0ed1061a769

Comment 14 Red Hat Bugzilla 2023-09-15 01:35:30 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days