This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/1] Fix __check_pf()/make_request() stack overflow segfault(convert to alloca_account) and memory leak.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: "Banerjee, Debabrata" <dbanerje at akamai dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "Hunt, Joshua" <johunt at akamai dot com>, "drepper at gmail dot com" <drepper at gmail dot com>, "roland at hack dot frob dot com" <roland at hack dot frob dot com>, "joseph at codesourcery dot com" <joseph at codesourcery dot com>
- Date: Thu, 21 Feb 2013 10:23:04 -0500
- Subject: Re: [PATCH 1/1] Fix __check_pf()/make_request() stack overflow segfault(convert to alloca_account) and memory leak.
- References: <CD497098.12E66%dbanerje@akamai.com>
On 02/19/2013 06:10 PM, Banerjee, Debabrata wrote:
> Resending and cc git blame:
Thank you very much for the patch!
Since this looks like your first patch to glibc there are a couple
of formal things we need to go through before we look at the content
of the changes.
> This patch converts make_request() to use alloca_account() so it doesn't
> overflow on the stack since it's grabbing essentially unbounded data from
> netlink. It also fixes a memory leak caused by the special casing for NSCD
> support in the non-NSCD case. I don't know why NSCD caching is in this
> layer, however I just made it work as designed. The unnecessary
> __libc_lock_lock() call was removed when not built for NSCD, and potential
> race on free fixed when it is built for NSCD. Tested with valgrind and
> very large netlink responses, both with and without ipv6 addresses.
Do you have copyright assignment in place with the FSF for glibc?
Next, please follow the contribution checklist carefully:
http://sourceware.org/glibc/wiki/Contribution%20checklist
> diff --git a/ChangeLog b/ChangeLog
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2013-02-14 Debabrata Banerjee <dbanerje@akamai.com>
> +
> + * sysdeps/unix/sysv/linux/check_pf.c: use alloca_account for
> check_pf()
Your mailer is wrapping lines, please fix this and resend.
> + fix memory leak and locking when not building in/with NSCD.
> +
The ChangeLog format isn't correct, please see the Contribution Checklist.
I can't look at the rest of your patch until I get confirmation
that you have copyright in place.
Cheers,
Carlos.