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 1200093

Summary: sssd_nss segfaults if initgroups request is by UPN and doesn't find anything
Product: Red Hat Enterprise Linux 6 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED ERRATA QA Contact: Kaushik Banerjee <kbanerje>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: apeetham, grajaiya, jgalipea, jhrozek, lslebodn, mkosek, mzidek, pbrezina, preichl
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.12.4-15.el6 Doc Type: Bug Fix
Doc Text:
Do not document.
Story Points: ---
Clone Of:
: 1201271 (view as bug list) Environment:
Last Closed: 2015-07-22 06:43:21 UTC Type: ---
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: 1201271    

Description Jakub Hrozek 2015-03-09 16:53:02 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/2598

If a client requests initgroups by UPN for a user that doesn't exist, sssd_nss crashes.

Please note it's not sufficient to test using "id" as "id" does "getpwnam" first which finds the user doesn't exist before running initgroups.

Comment 2 Jakub Hrozek 2015-03-12 09:18:21 UTC
Fixed upstream:
    master:
        aa648535f445e7a95bf6dedc7c43bb5f94ab7354
        ff19b24a93a50c8a62b5c2621e45d101e3a00781
        84a4c4fcc93b3dcc70604817a05f7943606ff596
        9cc2223e0bc0478c1b47a47fd71bba7e7129492d 
    sssd-1-12:
        d8006abd55f2ce0698e09213b8374e9071e70016 (only the fix without unit tests)

Comment 4 Jenny Severance 2015-04-15 12:32:55 UTC
Please add steps to reproduce and verify this issue

Comment 5 Jakub Hrozek 2015-04-15 12:40:14 UTC
Compile the program in comment 1 and pass a UPN that doesn't exist as an argument. That should do the trick and SSSD should crash with unpatched packages and return an error gracefully with patched packages.

Comment 6 Amith 2015-05-20 13:20:02 UTC
Verified the bug on SSSD Version : sssd-1.12.4-40.el6.x86_64

Steps followed during verification:

1. Compile the program mentioned in comment #1

2. Setup SSSD client against AD Server.

3. Execute the program against a non-existing UPN.

4. With the latest build, process sssd_nss shouldn't crash.

Log from /var/log/sssd/sssd_nss.log :
[sssd[nss]] [sss_ncache_set_str] (0x0400): Adding [NCE/USER/AD2/non-existing-user] to negative cache
[sssd[nss]] [nss_cmd_initgroups_search] (0x0040): No results for initgroups call
[sssd[nss]] [sss_dp_req_destructor] (0x0400): Deleting request: [0x41c250:3:non-existing-user@AD2]

Comment 8 errata-xmlrpc 2015-07-22 06:43:21 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, 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://rhn.redhat.com/errata/RHBA-2015-1448.html