This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RESEND-2][PATCH][BZ 13761] Fix allocation in nss_compat forlarge number of memberships to a group
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 28 Mar 2012 11:59:44 +0200
- Subject: Re: [RESEND-2][PATCH][BZ 13761] Fix allocation in nss_compat forlarge number of memberships to a group
- References: <20120326115258.665b2be5@spoyarek>
On 03/26/2012 08:22 AM, Siddhesh Poyarekar wrote:
Hi,
Resending once again:
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. Attached patch falls back to malloc/free if the buffer size
needed is beyond __libc_alloca_cutoff.
Please state in your submission how and where this was tested.
The patch itself looks fine to me but I'd like to hear about testing,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126