public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "siddhesh at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug nis/13761] New: [PATCH] Fix allocation in nss_compat for large number of memberships to a group Date: Mon, 27 Feb 2012 06:10:00 -0000 [thread overview] Message-ID: <bug-13761-131@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=13761 Bug #: 13761 Summary: [PATCH] Fix allocation in nss_compat for large number of memberships to a group Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: nis AssignedTo: unassigned@sourceware.org ReportedBy: siddhesh@redhat.com CC: kukuk@suse.de Classification: Unclassified nss_compat allocates buffer space on stack using alloca (and extend_alloca) for initgroup and keeps extending it to fit in larger lines. This breaks for cases where the number of members in a gorup are very large, causing the alloca reference to go beyond thread stack boundary. I have posted a patch on libc-alpha that implements a fallback to malloc/free if the buffer size needed is beyond __libc_alloca_cutoff: http://sourceware.org/ml/libc-alpha/2012-02/msg00503.html How reproducible: Always Steps to Reproduce: 1. In /etc/nsswitch.conf: group: compat group_compat: files 2. Create a large number of users for a single group for i in $(seq 1 70000); do useradd -M -N -s /sbin/nologin -G foo somelongusernameaaaaaaaaaaaa$i echo Created somelongusername$i done 3. Start nscd 4. groups somelongusernameaaaaaaaaaaaa100 Actual results: nscd crashes Expected results: nscd does not crash Additional info: This is also possible with ldap (the original case is with ldap): group: files compat group_compat: ldap -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next reply other threads:[~2012-02-27 6:10 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-02-27 6:10 siddhesh at redhat dot com [this message] 2012-02-27 6:17 ` [Bug nis/13761] " siddhesh at redhat dot com 2012-02-28 3:39 ` carlos at systemhalted dot org 2012-02-28 3:43 ` carlos at systemhalted dot org 2012-02-28 3:44 ` carlos at systemhalted dot org 2012-02-28 6:22 ` kukuk at suse dot de 2012-03-30 7:32 ` siddhesh at redhat dot com 2012-04-12 15:43 ` law at redhat dot com 2012-04-12 15:45 ` law at redhat dot com 2012-11-29 17:48 ` law at redhat dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-13761-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).