<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/sctp, branch v5.0</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=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-10T05:43:31Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-12-10T05:43:31Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-12-10T05:27:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4cc1feeb6ffc2799f8badb4dea77c637d340cb0d'/>
<id>urn:sha1:4cc1feeb6ffc2799f8badb4dea77c637d340cb0d</id>
<content type='text'>
Several conflicts, seemingly all over the place.

I used Stephen Rothwell's sample resolutions for many of these, if not
just to double check my own work, so definitely the credit largely
goes to him.

The NFP conflict consisted of a bug fix (moving operations
past the rhashtable operation) while chaning the initial
argument in the function call in the moved code.

The net/dsa/master.c conflict had to do with a bug fix intermixing of
making dsa_master_set_mtu() static with the fixing of the tagging
attribute location.

cls_flower had a conflict because the dup reject fix from Or
overlapped with the addition of port range classifiction.

__set_phy_supported()'s conflict was relatively easy to resolve
because Andrew fixed it in both trees, so it was just a matter
of taking the net-next copy.  Or at least I think it was :-)

Joe Stringer's fix to the handling of netns id 0 in bpf_sk_lookup()
intermixed with changes on how the sdif and caller_net are calculated
in these code paths in net-next.

The remaining BPF conflicts were largely about the addition of the
__bpf_md_ptr stuff in 'net' overlapping with adjustments and additions
to the relevant data structure where the MD pointer macros are used.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: frag_point sanity check</title>
<updated>2018-12-06T04:37:52Z</updated>
<author>
<name>Jakub Audykowicz</name>
<email>jakub.audykowicz@gmail.com</email>
</author>
<published>2018-12-04T19:27:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=afd0a8006e98b1890908f81746c94ca5dae29d7c'/>
<id>urn:sha1:afd0a8006e98b1890908f81746c94ca5dae29d7c</id>
<content type='text'>
If for some reason an association's fragmentation point is zero,
sctp_datamsg_from_user will try to endlessly try to divide a message
into zero-sized chunks. This eventually causes kernel panic due to
running out of memory.

Although this situation is quite unlikely, it has occurred before as
reported. I propose to add this simple last-ditch sanity check due to
the severity of the potential consequences.

Signed-off-by: Jakub Audykowicz &lt;jakub.audykowicz@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: kfree_rcu asoc</title>
<updated>2018-12-03T23:54:41Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-11-30T17:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb6df5a6234c38a9c551559506a49a677ac6f07a'/>
<id>urn:sha1:fb6df5a6234c38a9c551559506a49a677ac6f07a</id>
<content type='text'>
In sctp_hash_transport/sctp_epaddr_lookup_transport, it dereferences
a transport's asoc under rcu_read_lock while asoc is freed not after
a grace period, which leads to a use-after-free panic.

This patch fixes it by calling kfree_rcu to make asoc be freed after
a grace period.

Note that only the asoc's memory is delayed to free in the patch, it
won't cause sk to linger longer.

Thanks Neil and Marcelo to make this clear.

Fixes: 7fda702f9315 ("sctp: use new rhlist interface on sctp transport rhashtable")
Fixes: cd2b70875058 ("sctp: check duplicate node before inserting a new transport")
Reported-by: syzbot+0b05d8aa7cb185107483@syzkaller.appspotmail.com
Reported-by: syzbot+aad231d51b1923158444@syzkaller.appspotmail.com
Suggested-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2018-11-25T01:01:43Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2018-11-25T01:01:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c'/>
<id>urn:sha1:b1bf78bfb2e4c9ffa03ccdbc60d89a2f7c5fd82c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revert "sctp: remove sctp_transport_pmtu_check"</title>
<updated>2018-11-19T20:42:47Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-11-18T08:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69fec325a64383667b8a35df5d48d6ce52fb2782'/>
<id>urn:sha1:69fec325a64383667b8a35df5d48d6ce52fb2782</id>
<content type='text'>
This reverts commit 22d7be267eaa8114dcc28d66c1c347f667d7878a.

The dst's mtu in transport can be updated by a non sctp place like
in xfrm where the MTU information didn't get synced between asoc,
transport and dst, so it is still needed to do the pmtu check
in sctp_packet_config.

Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: rename enum sctp_event to sctp_event_type</title>
<updated>2018-11-19T20:25:43Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-11-18T08:08:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88ee48c1f3b7092414fb93c3cf0838ba24f62e16'/>
<id>urn:sha1:88ee48c1f3b7092414fb93c3cf0838ba24f62e16</id>
<content type='text'>
sctp_event is a structure name defined in RFC for sockopt
SCTP_EVENT. To avoid the conflict, rename it.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: add subscribe per asoc</title>
<updated>2018-11-19T20:25:43Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-11-18T08:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1e3a0590f9bd232f3a03fd87226a4a99bd5ec92'/>
<id>urn:sha1:a1e3a0590f9bd232f3a03fd87226a4a99bd5ec92</id>
<content type='text'>
The member subscribe should be per asoc, so that sockopt SCTP_EVENT
in the next patch can subscribe a event from one asoc only.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: define subscribe in sctp_sock as __u16</title>
<updated>2018-11-19T20:25:43Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-11-18T08:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2cc0eeb67636e0339ad7b6cdfa305f63983642af'/>
<id>urn:sha1:2cc0eeb67636e0339ad7b6cdfa305f63983642af</id>
<content type='text'>
The member subscribe in sctp_sock is used to indicate to which of
the events it is subscribed, more like a group of flags. So it's
better to be defined as __u16 (2 bytpes), instead of struct
sctp_event_subscribe (13 bytes).

Note that sctp_event_subscribe is an UAPI struct, used on sockopt
calls, and thus it will not be removed. This patch only changes
the internal storage of the flags.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: process sk_reuseport in sctp_get_port_local</title>
<updated>2018-11-12T17:09:51Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-11-12T10:27:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ba84574026792ce33a40c7da721dea36d0f3973'/>
<id>urn:sha1:6ba84574026792ce33a40c7da721dea36d0f3973</id>
<content type='text'>
When socks' sk_reuseport is set, the same port and address are allowed
to be bound into these socks who have the same uid.

Note that the difference from sk_reuse is that it allows multiple socks
to listen on the same port and address.

Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: add sock_reuseport for the sock in __sctp_hash_endpoint</title>
<updated>2018-11-12T17:09:51Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2018-11-12T10:27:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe'/>
<id>urn:sha1:76c6d988aeb3c15d57ea0c245a3b5f27802c1fbe</id>
<content type='text'>
This is a part of sk_reuseport support for sctp. It defines a helper
sctp_bind_addrs_check() to check if the bind_addrs in two socks are
matched. It will add sock_reuseport if they are completely matched,
and return err if they are partly matched, and alloc sock_reuseport
if all socks are not matched at all.

It will work until sk_reuseport support is added in
sctp_get_port_local() in the next patch.

v1-&gt;v2:
  - use 'laddr-&gt;valid &amp;&amp; laddr2-&gt;valid' check instead as Marcelo
    pointed in sctp_bind_addrs_check().

Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
