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 826747

Summary: sudo segfault error 4 in pam_winbind
Product: Red Hat Enterprise Linux 6 Reporter: Jesse <bowling>
Component: sudoAssignee: Daniel Kopeček <dkopecek>
Status: CLOSED NOTABUG QA Contact: Dalibor Pospíšil <dapospis>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: dapospis, ddas, nkarandi, rrajaram
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-18 10:48:13 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:
Attachments:
Description Flags
core file none

Description Jesse 2012-05-30 21:46:08 UTC
Description of problem:
After configuring krb5 authentication and winbind, attempts to sudo generate a segfault similar to:

May 30 17:28:17 hostname kernel: sudo[1629]: segfault at 0 ip 00007ffcabdc89eb sp 00007fff4af53790 error 4 in pam_winbind.so[7ffcabdc1000+e000]


Version-Release number of selected component (if applicable):
sudo-1.7.4p5-9.el6_2.x86_64
samba-winbind-clients-3.5.10-116.el6_2.x86_64
samba-winbind-3.5.10-116.el6_2.x86_64
krb5-workstation-1.9-22.el6_2.1.x86_64
pam_krb5-2.3.11-9.el6.x86_64
krb5-libs-1.9-22.el6_2.1.x86_64


How reproducible:
Configure krb + winbind, then attempt to sudo. Any user (including local-only) will cause sudo to segfault.

Steps to Reproduce:
1.yum install -y krb5-workstation sudo pam_krb5 samba-winbind 
2.authconfig --enablekrb5 --krb5realm=MYDOMAIN.EDU --enablekrb5kdcdns --krb5adminserver=domain.admin.server.mine:749 --krb5kdc=kdc.server.mine:88 –update
3.authconfig --enablewinbind --enablewinbindauth --smbrealm=MYDOMAIN.EDU --enablewinbindusedefaultdomain --winbindtemplateshell=/bin/bash --smbsecurity ads --winbindtemplatehomedir=/home/%U --enablemkhomedir --smbworkgroup=MYDOMAIN --update
4. net ads join -U adminname
5. Log in as any non-root user (domain or local)
6. sudo something

Actual results:
Segfault, no sudo done

Expected results:
Sudo should not segfault

Additional info:
Willing to provide any additional backtrace/crash dump, but need instructions on how to generate.

Comment 2 RHEL Program Management 2012-06-03 05:47:07 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 7 Nirupama Karandikar 2012-07-30 11:19:24 UTC
Created attachment 601216 [details]
core file

Comment 9 RHEL Program Management 2012-12-14 08:40:56 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 12 Daniel Kopeček 2013-08-14 14:08:34 UTC
I cannot reproduce the problem with the recent build of sudo. I didn't test the previous version, so I'm not sure whether it segfaulted or not. Please re-test with the latest build in brew.

I don't think this is a problem in sudo as it doesn't do processing of the require_membership_of parameter. pam_winbind does it internally as is stated in the man page:

       require_membership_of=[SID or NAME]
           If this option is set, pam_winbind will only succeed if the user is
           a member of the given SID or NAME. A SID can be either a group-SID,
           an alias-SID or even an user-SID. It is also possible to give a
           NAME instead of the SID. That name must have the form:
           MYDOMAIN\\mygroup or MYDOMAIN\\myuser. pam_winbind will, in that
           case, lookup the SID internally. Note that NAME may not contain any
           spaces. It is thus recommended to only use SIDs. You can verify the
           list of SIDs a user is a member of with wbinfo --user-sids=SID.

Please consider moving this bug to the samba (samba-winbind-clients) component if you see the segfault with the latest sudo too.

Thanks,
Dan K.

Comment 13 RHEL Program Management 2013-10-14 04:57:05 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 15 Daniel Kopeček 2014-03-18 10:48:13 UTC
Closing as NOTABUG. Feel free to re-open if the issue still persists.