[PATCH] gshadow: Handle the parser's full buffer error code
David Michael
fedora.dm0@gmail.com
Fri Jul 8 14:52:00 GMT 2016
On Fri, Jul 8, 2016 at 5:02 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 06/25/2016 02:27 AM, David Michael wrote:
>
>> * gshadow/fgetsgent_r.c (__fgetsgent_r): Return ERANGE when the
>> parse_line function returns its out-of-space error.
>
>
>> The fgetgsent function isn't handling errors from parse_line. That
>> means it can run out of buffer space when adding pointers to group
>> members and exit early without setting all members of the static result
>> struct. The static result's members will remain pointing at buffer
>> locations from the previous line, which have been overwritten with
>> incompatible data, causing segfaults after it is returned normally.
>
>
> This needs a bug in Bugzilla.
I have filed bug #20338.[0]
> Do you have a copyright assignment covering glibc on file with the FSF?
I don't personally, but the copyright holder of this change (if it is
considered legally significant) should be CoreOS, Inc. I would
imagine they've contributed before, but if not, I can try to find
someone to sign off on it later today.
Thanks.
David
[0] https://sourceware.org/bugzilla/show_bug.cgi?id=20338
More information about the Libc-alpha
mailing list