<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/sctp/input.c, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-12-07T02:20:07Z</updated>
<entry>
<title>sctp: add the missing sock_owned_by_user check in sctp_icmp_redirect</title>
<updated>2017-12-07T02:20:07Z</updated>
<author>
<name>Xin Long</name>
</author>
<published>2017-10-18T13:37:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2428532b076b0ab6a0e3af69ae75554bced08007'/>
<id>urn:sha1:2428532b076b0ab6a0e3af69ae75554bced08007</id>
<content type='text'>
[ Upstream commit 1cc276cec9ec574d41cf47dfc0f51406b6f26ab4 ]

Now sctp processes icmp redirect packet in sctp_icmp_redirect where
it calls sctp_transport_dst_check in which tp-&gt;dst can be released.

The problem is before calling sctp_transport_dst_check, it doesn't
check sock_owned_by_user, which means tp-&gt;dst could be freed while
a process is accessing it with owning the socket.

An use-after-free issue could be triggered by this.

This patch is to fix it by checking sock_owned_by_user before calling
sctp_transport_dst_check in sctp_icmp_redirect, so that it would not
release tp-&gt;dst if users still hold sock lock.

Besides, the same issue fixed in commit 45caeaa5ac0b ("dccp/tcp: fix
routing redirect race") on sctp also needs this check.

Fixes: 55be7a9c6074 ("ipv4: Add redirect support to all protocol icmp error handlers")
Reported-by: Eric Dumazet &lt;edumazet@google.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;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>sctp: fix ICMP processing if skb is non-linear</title>
<updated>2017-06-25T04:25:35Z</updated>
<author>
<name>Davide Caratti</name>
</author>
<published>2017-05-25T17:14:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80f68f7daeb3bc2c41cd876d9abdf3a99e9e571b'/>
<id>urn:sha1:80f68f7daeb3bc2c41cd876d9abdf3a99e9e571b</id>
<content type='text'>
[ Upstream commit 804ec7ebe8ea003999ca8d1bfc499edc6a9e07df ]

sometimes ICMP replies to INIT chunks are ignored by the client, even if
the encapsulated SCTP headers match an open socket. This happens when the
ICMP packet is carried by a paged skb: use skb_header_pointer() to read
packet contents beyond the SCTP header, so that chunk header and initiate
tag are validated correctly.

v2:
- don't use skb_header_pointer() to read the transport header, since
  icmp_socket_deliver() already puts these 8 bytes in the linear area.
- change commit message to make specific reference to INIT chunks.

Signed-off-by: Davide Caratti &lt;dcaratti@redhat.com&gt;
Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.com&gt;
Reviewed-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>sctp: Change sctp to implement csum_levels</title>
<updated>2014-08-30T03:41:11Z</updated>
<author>
<name>Tom Herbert</name>
</author>
<published>2014-08-28T04:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=202863fe4c7a5b0b9a3d3a00d207691635b31930'/>
<id>urn:sha1:202863fe4c7a5b0b9a3d3a00d207691635b31930</id>
<content type='text'>
CHECKSUM_UNNECESSARY may be applied to the SCTP CRC so we need to
appropriate account for this by decrementing csum_level. This is
done by calling __skb_dec_checksum_unnecessary.

Signed-off-by: Tom Herbert &lt;therbert@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fix the counter ICMP_MIB_INERRORS/ICMP6_MIB_INERRORS</title>
<updated>2014-08-01T05:04:18Z</updated>
<author>
<name>Duan Jiong</name>
</author>
<published>2014-07-31T09:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7304fe4681634a8e0511a5922c972aa132ffb43d'/>
<id>urn:sha1:7304fe4681634a8e0511a5922c972aa132ffb43d</id>
<content type='text'>
When dealing with ICMPv[46] Error Message, function icmp_socket_deliver()
and icmpv6_notify() do some valid checks on packet's length, but then some
protocols check packet's length redaudantly. So remove those duplicated
statements, and increase counter ICMP_MIB_INERRORS/ICMP6_MIB_INERRORS in
function icmp_socket_deliver() and icmpv6_notify() respectively.

In addition, add missed counter in udp6/udplite6 when socket is NULL.

Signed-off-by: Duan Jiong &lt;duanj.fnst@cn.fujitsu.com&gt;
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: remove macros sctp_bh_[un]lock_sock</title>
<updated>2014-01-22T02:41:36Z</updated>
<author>
<name>wangweidong</name>
</author>
<published>2014-01-21T07:44:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5bc1d1b4a261a865cbde65b1561748df5b9c724b'/>
<id>urn:sha1:5bc1d1b4a261a865cbde65b1561748df5b9c724b</id>
<content type='text'>
Redefined bh_[un]lock_sock to sctp_bh[un]lock_sock for user
space friendly code which we haven't use in years, so removing them.

Signed-off-by: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: remove macros sctp_write_[un]_lock</title>
<updated>2014-01-22T02:40:41Z</updated>
<author>
<name>wangweidong</name>
</author>
<published>2014-01-21T07:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=387602dfdc3332f786f6195c74d53f9e8f7af402'/>
<id>urn:sha1:387602dfdc3332f786f6195c74d53f9e8f7af402</id>
<content type='text'>
Redefined write_[un]lock to sctp_write_[un]lock for user space
friendly code which we haven't use in years, so removing them.

Signed-off-by: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: remove macros sctp_local_bh_{disable|enable}</title>
<updated>2014-01-22T02:40:40Z</updated>
<author>
<name>wangweidong</name>
</author>
<published>2014-01-21T07:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79b91130a2679ea5063d49c021d97346a09eb0a5'/>
<id>urn:sha1:79b91130a2679ea5063d49c021d97346a09eb0a5</id>
<content type='text'>
Redefined local_bh_{disable|enable} to sctp_local_bh_{disable|enable}
for user space friendly code which we haven't use in years, so removing them.

Signed-off-by: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: fix checkpatch errors with open brace '{' and trailing statements</title>
<updated>2013-12-26T18:47:48Z</updated>
<author>
<name>wangweidong</name>
</author>
<published>2013-12-23T04:16:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d72651d86e9c702d37dd9ef9f084ce027af90a7'/>
<id>urn:sha1:8d72651d86e9c702d37dd9ef9f084ce027af90a7</id>
<content type='text'>
fix checkpatch errors below:
ERROR: that open brace { should be on the previous line
ERROR: open brace '{' following function declarations go on the next line
ERROR: trailing statements should be on next line

Signed-off-by: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: fix checkpatch errors with indent</title>
<updated>2013-12-26T18:47:48Z</updated>
<author>
<name>wangweidong</name>
</author>
<published>2013-12-23T04:16:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7010e61442c80333b38aa026a551043a341fb8d'/>
<id>urn:sha1:f7010e61442c80333b38aa026a551043a341fb8d</id>
<content type='text'>
fix checkpatch errors below:
ERROR: switch and case should be at the same inden
ERROR: code indent should use tabs where possible

Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: fix checkpatch errors with space required or prohibited</title>
<updated>2013-12-26T18:47:47Z</updated>
<author>
<name>wangweidong</name>
</author>
<published>2013-12-23T04:16:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb3f837ba95d7774978e86fc17ddf970cf7d15a4'/>
<id>urn:sha1:cb3f837ba95d7774978e86fc17ddf970cf7d15a4</id>
<content type='text'>
fix checkpatch errors while the space is required or prohibited
to the "=,()++..."

Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Wang Weidong &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
