Bug 1252570

Summary: glibc-2.21.90-21.fc23 segfaults in hesiod getgrouplist()
Product: [Fedora] Fedora Reporter: Nalin Dahyabhai <nalin>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: arjun, codonell, fweimer, jakub, law, mfabian, mnewsome, pfrankli
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.22-8.fc23, glibc-2.22.90-35.fc24 glibc-2.22-9.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-17 14:20:37 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: 1305132    
Attachments:
Description Flags
gdb "where full" results, plus a couple of variables none

Description Nalin Dahyabhai 2015-08-11 17:54:24 UTC
Created attachment 1061638 [details]
gdb "where full" results, plus a couple of variables

Description of problem:
With a working hesiod configuration, and hesiod enabled for group resolution, multiple applications are crashing while initializing a supplemental groups list.

Version-Release number of selected component (if applicable):
glibc-2.21.90-21.fc23.x86_64
coreutils-8.24-2.fc23.x86_64 used to reproduce the bug

How reproducible:
Always

Steps to Reproduce:
1. cat > /etc/hesiod.conf << EOF
lhs=.hs
rhs=.devel.redhat.com
EOF
2. Add "hesiod" as a source for "group" information in /etc/nsswitch.conf.  Mine reads "files hesiod".
3. Run "groups nalin" or similar.

Actual results:
"groups" segfaults.  I'll attach the gdb backtrace.

Expected results:
The expected groups list.

Additional info:

Comment 1 Florian Weimer 2016-02-05 14:13:21 UTC
Caused by upstream commit 2212c1420c92a33b0e0bd9a34938c9814a56c0f7.  Bug reported upstream.  There are various ways to fix this, but which approach is best is unclear.

Comment 2 Florian Weimer 2016-02-15 11:24:29 UTC
Reproducer without changing /etc:

cat > /etc/hesiod.conf << EOF
lhs=.hs
rhs=.devel.redhat.com
EOF
HESIOD_CONFIG=hesiod.conf getent -s hesiod group 0 0

I'm reverting the upstream commit which introduced this bug.

Comment 3 Fedora Update System 2016-02-16 16:08:11 UTC
glibc-2.22-9.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0f9e9a34ce

Comment 4 Fedora Update System 2016-02-17 06:26:43 UTC
glibc-2.22-9.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0f9e9a34ce

Comment 5 Fedora Update System 2016-02-17 14:20:20 UTC
glibc-2.22-9.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Florian Weimer 2016-02-17 18:48:28 UTC
Due to this change, a glibc update to the fixed versions *without* a reboot (or process restart) may cause name resolution failures.