[PATCH v2] glibc: Terminate process on invalid netlink response from kernel [BZ #12926]
Florian Weimer
fweimer@redhat.com
Tue Nov 3 13:40:00 GMT 2015
On 10/24/2015 06:22 AM, Mike Frysinger wrote:
> On 23 Oct 2015 22:07, Florian Weimer wrote:
>> --- /dev/null
>> +++ b/sysdeps/unix/sysv/linux/netlink_assert_response.c
>> @@ -0,0 +1,100 @@
>> +/* Copyright (C) 2015 Free Software Foundation, Inc.
>> + This file is part of the GNU C Library.
>
> guess we like to have the first line be a short desc of the file
Added.
>> +static int
>> +get_address_family (int fd)
>> +{
>> ...
>> + return sa.ss_family;
> ss_family is of type sa_family_t, not int ... not a big deal, but the
> two do differ in sign ...
Thanks. I added static asserts to make sure that the actual type does
not cause problems with the use of -1 and an int return value.
I do not want to use SO_DOMAIN here because I expect this to eventually
move into generic code because we probably should do similar checking on
other internally-used sockets (where reporting impossible errors to the
caller would be grossly misleading).
I'm still waiting for comments from the kernel people. :)
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Terminate-process-on-invalid-netlink-response-from-k.patch
Type: text/x-patch
Size: 10692 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151103/2fae30b2/attachment.bin>
More information about the Libc-alpha
mailing list