<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-12-02T19:10:14Z</updated>
<entry>
<title>net: avoid signed overflows for SO_{SND|RCV}BUFFORCE</title>
<updated>2016-12-02T19:10:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-12-02T17:44:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b98b0bc8c431e3ceb4b26b0dfc8db509518fb290'/>
<id>urn:sha1:b98b0bc8c431e3ceb4b26b0dfc8db509518fb290</id>
<content type='text'>
CAP_NET_ADMIN users should not be allowed to set negative
sk_sndbuf or sk_rcvbuf values, as it can lead to various memory
corruptions, crashes, OOM...

Note that before commit 82981930125a ("net: cleanups in
sock_setsockopt()"), the bug was even more serious, since SO_SNDBUF
and SO_RCVBUF were vulnerable.

This needs to be backported to all known linux kernels.

Again, many thanks to syzkaller team for discovering this gem.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Andrey Konovalov &lt;andreyknvl@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/rtnetlink: fix attribute name in nlmsg_size() comments</title>
<updated>2016-12-02T15:34:59Z</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2016-11-30T13:30:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6919756caaeaa76dc56287252fb656e3c2d9b4e1'/>
<id>urn:sha1:6919756caaeaa76dc56287252fb656e3c2d9b4e1</id>
<content type='text'>
Use the correct attribute constant names IFLA_GSO_MAX_{SEGS,SIZE}
instead of IFLA_MAX_GSO_{SEGS,SIZE} for the comments int nlmsg_size().

Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec</title>
<updated>2016-11-28T01:21:48Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-11-28T01:21:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8eb4adf60b8a2e0857643910c01aac98fe613466'/>
<id>urn:sha1:8eb4adf60b8a2e0857643910c01aac98fe613466</id>
<content type='text'>
Steffen Klassert says:

====================
pull request (net): ipsec 2016-11-25

1) Fix a refcount leak in vti6.
   From Nicolas Dichtel.

2) Fix a wrong if statement in xfrm_sk_policy_lookup.
   From Florian Westphal.

3) The flowcache watermarks are per cpu. Take this into
   account when comparing to the threshold where we
   refusing new allocations. From Miroslav Urbanek.

Please pull or let me know if there are problems.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: ethtool: don't require CAP_NET_ADMIN for ETHTOOL_GLINKSETTINGS</title>
<updated>2016-11-26T01:23:30Z</updated>
<author>
<name>Miroslav Lichvar</name>
<email>mlichvar@redhat.com</email>
</author>
<published>2016-11-24T09:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8006f6bf5e39f11c697f48df20382b81d2f2f8b8'/>
<id>urn:sha1:8006f6bf5e39f11c697f48df20382b81d2f2f8b8</id>
<content type='text'>
The ETHTOOL_GLINKSETTINGS command is deprecating the ETHTOOL_GSET
command and likewise it shouldn't require the CAP_NET_ADMIN capability.

Signed-off-by: Miroslav Lichvar &lt;mlichvar@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnetlink: fix the wrong minimal dump size getting from rtnl_calcit()</title>
<updated>2016-11-24T01:18:36Z</updated>
<author>
<name>Zhang Shengju</name>
<email>zhangshengju@cmss.chinamobile.com</email>
</author>
<published>2016-11-22T06:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93af205656bed3d8d3f4b85b2a3749c7ed7d996a'/>
<id>urn:sha1:93af205656bed3d8d3f4b85b2a3749c7ed7d996a</id>
<content type='text'>
For RT netlink, calcit() function should return the minimal size for
netlink dump message. This will make sure that dump message for every
network device can be stored.

Currently, rtnl_calcit() function doesn't account the size of header of
netlink message, this patch will fix it.

Signed-off-by: Zhang Shengju &lt;zhangshengju@cmss.chinamobile.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>flowcache: Increase threshold for refusing new allocations</title>
<updated>2016-11-23T05:37:09Z</updated>
<author>
<name>Miroslav Urbanek</name>
<email>mu@miroslavurbanek.com</email>
</author>
<published>2016-11-21T14:48:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b226487815574193c1da864f2eac274781a2b0c'/>
<id>urn:sha1:6b226487815574193c1da864f2eac274781a2b0c</id>
<content type='text'>
The threshold for OOM protection is too small for systems with large
number of CPUs. Applications report ENOBUFs on connect() every 10
minutes.

The problem is that the variable net-&gt;xfrm.flow_cache_gc_count is a
global counter while the variable fc-&gt;high_watermark is a per-CPU
constant. Take the number of CPUs into account as well.

Fixes: 6ad3122a08e3 ("flowcache: Avoid OOM condition under preasure")
Reported-by: Lukáš Koldrt &lt;lk@excello.cz&gt;
Tested-by: Jan Hejl &lt;jh@excello.cz&gt;
Signed-off-by: Miroslav Urbanek &lt;mu@miroslavurbanek.com&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
</content>
</entry>
<entry>
<title>flow_dissect: call init_default_flow_dissectors() earlier</title>
<updated>2016-11-22T19:44:01Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-11-22T19:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9b8af1330198ae241cd545e1f040019010d44d9'/>
<id>urn:sha1:c9b8af1330198ae241cd545e1f040019010d44d9</id>
<content type='text'>
Andre Noll reported panics after my recent fix (commit 34fad54c2537
"net: __skb_flow_dissect() must cap its return value")

After some more headaches, Alexander root caused the problem to
init_default_flow_dissectors() being called too late, in case
a network driver like IGB is not a module and receives DHCP message
very early.

Fix is to call init_default_flow_dissectors() much earlier,
as it is a core infrastructure and does not depend on another
kernel service.

Fixes: 06635a35d13d4 ("flow_dissect: use programable dissector in skb_flow_dissect and friends")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Andre Noll &lt;maan@tuebingen.mpg.de&gt;
Diagnosed-by: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnl: fix the loop index update error in rtnl_dump_ifinfo()</title>
<updated>2016-11-20T03:14:30Z</updated>
<author>
<name>Zhang Shengju</name>
<email>zhangshengju@cmss.chinamobile.com</email>
</author>
<published>2016-11-19T15:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3'/>
<id>urn:sha1:3f0ae05d6fea0ed5b19efdbc9c9f8e02685a3af3</id>
<content type='text'>
If the link is filtered out, loop index should also be updated. If not,
loop index will not be correct.

Fixes: dc599f76c22b0 ("net: Add support for filtering link dump by master device and kind")
Signed-off-by: Zhang Shengju &lt;zhangshengju@cmss.chinamobile.com&gt;
Acked-by: David Ahern &lt;dsa@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>rtnetlink: fix FDB size computation</title>
<updated>2016-11-18T19:09:42Z</updated>
<author>
<name>Sabrina Dubroca</name>
<email>sd@queasysnail.net</email>
</author>
<published>2016-11-18T14:50:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f82ef3e10a870acc19fa04f80ef5877eaa26f41e'/>
<id>urn:sha1:f82ef3e10a870acc19fa04f80ef5877eaa26f41e</id>
<content type='text'>
Add missing NDA_VLAN attribute's size.

Fixes: 1e53d5bb8878 ("net: Pass VLAN ID to rtnl_fdb_notify.")
Signed-off-by: Sabrina Dubroca &lt;sd@queasysnail.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: check dead netns for peernet2id_alloc()</title>
<updated>2016-11-17T16:19:40Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2016-11-16T18:27:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cfc44a4d147ea605d66ccb917cc24467d15ff867'/>
<id>urn:sha1:cfc44a4d147ea605d66ccb917cc24467d15ff867</id>
<content type='text'>
Andrei reports we still allocate netns ID from idr after we destroy
it in cleanup_net().

cleanup_net():
  ...
  idr_destroy(&amp;net-&gt;netns_ids);
  ...
  list_for_each_entry_reverse(ops, &amp;pernet_list, list)
    ops_exit_list(ops, &amp;net_exit_list);
      -&gt; rollback_registered_many()
        -&gt; rtmsg_ifinfo_build_skb()
         -&gt; rtnl_fill_ifinfo()
           -&gt; peernet2id_alloc()

After that point we should not even access net-&gt;netns_ids, we
should check the death of the current netns as early as we can in
peernet2id_alloc().

For net-next we can consider to avoid sending rtmsg totally,
it is a good optimization for netns teardown path.

Fixes: 0c7aecd4bde4 ("netns: add rtnl cmd to add and get peer netns ids")
Reported-by: Andrei Vagin &lt;avagin@gmail.com&gt;
Cc: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Andrei Vagin &lt;avagin@openvz.org&gt;
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
