Thread (7 messages) 7 messages, 4 authors, 2015-11-05

[PATCH v2] glibc: Terminate process on invalid netlink response from kernel [BZ #12926]

flat view
STALE3990d

From: Florian Weimer <hidden>
Date: 2015-11-03 13:40:18

On 10/24/2015 06:22 AM, Mike Frysinger wrote:
On 23 Oct 2015 22:07, Florian Weimer wrote:
quoted
--- /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.
quoted
+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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help