<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net, branch v5.3</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.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-09-13T20:06:20Z</updated>
<entry>
<title>sctp: destroy bucket if failed to bind addr</title>
<updated>2019-09-13T20:06:20Z</updated>
<author>
<name>Mao Wenan</name>
<email>maowenan@huawei.com</email>
</author>
<published>2019-09-12T04:02:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=29b99f54a8e63f871cf4060406d09fd8b0d744d8'/>
<id>urn:sha1:29b99f54a8e63f871cf4060406d09fd8b0d744d8</id>
<content type='text'>
There is one memory leak bug report:
BUG: memory leak
unreferenced object 0xffff8881dc4c5ec0 (size 40):
  comm "syz-executor.0", pid 5673, jiffies 4298198457 (age 27.578s)
  hex dump (first 32 bytes):
    02 00 00 00 81 88 ff ff 00 00 00 00 00 00 00 00  ................
    f8 63 3d c1 81 88 ff ff 00 00 00 00 00 00 00 00  .c=.............
  backtrace:
    [&lt;0000000072006339&gt;] sctp_get_port_local+0x2a1/0xa00 [sctp]
    [&lt;00000000c7b379ec&gt;] sctp_do_bind+0x176/0x2c0 [sctp]
    [&lt;000000005be274a2&gt;] sctp_bind+0x5a/0x80 [sctp]
    [&lt;00000000b66b4044&gt;] inet6_bind+0x59/0xd0 [ipv6]
    [&lt;00000000c68c7f42&gt;] __sys_bind+0x120/0x1f0 net/socket.c:1647
    [&lt;000000004513635b&gt;] __do_sys_bind net/socket.c:1658 [inline]
    [&lt;000000004513635b&gt;] __se_sys_bind net/socket.c:1656 [inline]
    [&lt;000000004513635b&gt;] __x64_sys_bind+0x3e/0x50 net/socket.c:1656
    [&lt;0000000061f2501e&gt;] do_syscall_64+0x72/0x2e0 arch/x86/entry/common.c:296
    [&lt;0000000003d1e05e&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xbe

This is because in sctp_do_bind, if sctp_get_port_local is to
create hash bucket successfully, and sctp_add_bind_addr failed
to bind address, e.g return -ENOMEM, so memory leak found, it
needs to destroy allocated bucket.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Mao Wenan &lt;maowenan@huawei.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: remove redundant assignment when call sctp_get_port_local</title>
<updated>2019-09-13T20:06:20Z</updated>
<author>
<name>Mao Wenan</name>
<email>maowenan@huawei.com</email>
</author>
<published>2019-09-12T04:02:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0e4b8de10ad3affe83cc91a1cf6d1e48cca333e'/>
<id>urn:sha1:e0e4b8de10ad3affe83cc91a1cf6d1e48cca333e</id>
<content type='text'>
There are more parentheses in if clause when call sctp_get_port_local
in sctp_do_bind, and redundant assignment to 'ret'. This patch is to
do cleanup.

Signed-off-by: Mao Wenan &lt;maowenan@huawei.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: change return type of sctp_get_port_local</title>
<updated>2019-09-13T20:06:20Z</updated>
<author>
<name>Mao Wenan</name>
<email>maowenan@huawei.com</email>
</author>
<published>2019-09-12T04:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e2ef6abd4653b1cfeefe262017ecdd5eaf40fef'/>
<id>urn:sha1:8e2ef6abd4653b1cfeefe262017ecdd5eaf40fef</id>
<content type='text'>
Currently sctp_get_port_local() returns a long
which is either 0,1 or a pointer casted to long.
It's neither of the callers use the return value since
commit 62208f12451f ("net: sctp: simplify sctp_get_port").
Now two callers are sctp_get_port and sctp_do_bind,
they actually assumend a casted to an int was the same as
a pointer casted to a long, and they don't save the return
value just check whether it is zero or non-zero, so
it would better change return type from long to int for
sctp_get_port_local.

Signed-off-by: Mao Wenan &lt;maowenan@huawei.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: Fix the link time qualifier of 'sctp_ctrlsock_exit()'</title>
<updated>2019-09-12T11:55:28Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2019-09-11T16:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b456d72412ca8797234449c25815e82f4e1426c0'/>
<id>urn:sha1:b456d72412ca8797234449c25815e82f4e1426c0</id>
<content type='text'>
The '.exit' functions from 'pernet_operations' structure should be marked
as __net_exit, not __net_init.

Fixes: 8e2d61e0aed2 ("sctp: fix race on protocol/netns initialization")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&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>net: qrtr: fix memort leak in qrtr_tun_write_iter</title>
<updated>2019-09-12T10:58:44Z</updated>
<author>
<name>Navid Emamdoost</name>
<email>navid.emamdoost@gmail.com</email>
</author>
<published>2019-09-11T15:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a21b7f0cff1906a93a0130b74713b15a0b36481d'/>
<id>urn:sha1:a21b7f0cff1906a93a0130b74713b15a0b36481d</id>
<content type='text'>
In qrtr_tun_write_iter the allocated kbuf should be release in case of
error or success return.

v2 Update: Thanks to David Miller for pointing out the release on success
path as well.

Signed-off-by: Navid Emamdoost &lt;navid.emamdoost@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix null de-reference of device refcount</title>
<updated>2019-09-12T10:55:34Z</updated>
<author>
<name>Subash Abhinov Kasiviswanathan</name>
<email>subashab@codeaurora.org</email>
</author>
<published>2019-09-10T20:02:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=10cc514f451a0f239aa34f91bc9dc954a9397840'/>
<id>urn:sha1:10cc514f451a0f239aa34f91bc9dc954a9397840</id>
<content type='text'>
In event of failure during register_netdevice, free_netdev is
invoked immediately. free_netdev assumes that all the netdevice
refcounts have been dropped prior to it being called and as a
result frees and clears out the refcount pointer.

However, this is not necessarily true as some of the operations
in the NETDEV_UNREGISTER notifier handlers queue RCU callbacks for
invocation after a grace period. The IPv4 callback in_dev_rcu_put
tries to access the refcount after free_netdev is called which
leads to a null de-reference-

44837.761523:   &lt;6&gt; Unable to handle kernel paging request at
                    virtual address 0000004a88287000
44837.761651:   &lt;2&gt; pc : in_dev_finish_destroy+0x4c/0xc8
44837.761654:   &lt;2&gt; lr : in_dev_finish_destroy+0x2c/0xc8
44837.762393:   &lt;2&gt; Call trace:
44837.762398:   &lt;2&gt;  in_dev_finish_destroy+0x4c/0xc8
44837.762404:   &lt;2&gt;  in_dev_rcu_put+0x24/0x30
44837.762412:   &lt;2&gt;  rcu_nocb_kthread+0x43c/0x468
44837.762418:   &lt;2&gt;  kthread+0x118/0x128
44837.762424:   &lt;2&gt;  ret_from_fork+0x10/0x1c

Fix this by waiting for the completion of the call_rcu() in
case of register_netdevice errors.

Fixes: 93ee31f14f6f ("[NET]: Fix free_netdev on register_netdev failure.")
Cc: Sean Tranchetti &lt;stranche@codeaurora.org&gt;
Signed-off-by: Subash Abhinov Kasiviswanathan &lt;subashab@codeaurora.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: Fix the link time qualifier of 'ping_v6_proc_exit_net()'</title>
<updated>2019-09-12T10:20:33Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2019-09-10T11:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d23dbc479a8e813db4161a695d67da0e36557846'/>
<id>urn:sha1:d23dbc479a8e813db4161a695d67da0e36557846</id>
<content type='text'>
The '.exit' functions from 'pernet_operations' structure should be marked
as __net_exit, not __net_init.

Fixes: d862e5461423 ("net: ipv6: Implement /proc/net/icmp6.")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: fix tcp_ecn_withdraw_cwr() to clear TCP_ECN_QUEUE_CWR</title>
<updated>2019-09-11T22:53:18Z</updated>
<author>
<name>Neal Cardwell</name>
<email>ncardwell@google.com</email>
</author>
<published>2019-09-09T20:56:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af38d07ed391b21f7405fa1f936ca9686787d6d2'/>
<id>urn:sha1:af38d07ed391b21f7405fa1f936ca9686787d6d2</id>
<content type='text'>
Fix tcp_ecn_withdraw_cwr() to clear the correct bit:
TCP_ECN_QUEUE_CWR.

Rationale: basically, TCP_ECN_DEMAND_CWR is a bit that is purely about
the behavior of data receivers, and deciding whether to reflect
incoming IP ECN CE marks as outgoing TCP th-&gt;ece marks. The
TCP_ECN_QUEUE_CWR bit is purely about the behavior of data senders,
and deciding whether to send CWR. The tcp_ecn_withdraw_cwr() function
is only called from tcp_undo_cwnd_reduction() by data senders during
an undo, so it should zero the sender-side state,
TCP_ECN_QUEUE_CWR. It does not make sense to stop the reflection of
incoming CE bits on incoming data packets just because outgoing
packets were spuriously retransmitted.

The bug has been reproduced with packetdrill to manifest in a scenario
with RFC3168 ECN, with an incoming data packet with CE bit set and
carrying a TCP timestamp value that causes cwnd undo. Before this fix,
the IP CE bit was ignored and not reflected in the TCP ECE header bit,
and sender sent a TCP CWR ('W') bit on the next outgoing data packet,
even though the cwnd reduction had been undone.  After this fix, the
sender properly reflects the CE bit and does not set the W bit.

Note: the bug actually predates 2005 git history; this Fixes footer is
chosen to be the oldest SHA1 I have tested (from Sep 2007) for which
the patch applies cleanly (since before this commit the code was in a
.h file).

Fixes: bdf1ee5d3bd3 ("[TCP]: Move code from tcp_ecn.h to tcp*.c and tcp.h &amp; remove it")
Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
Acked-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Soheil Hassas Yeganeh &lt;soheil@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/rds: An rds_sock is added too early to the hash table</title>
<updated>2019-09-11T14:05:40Z</updated>
<author>
<name>Ka-Cheong Poon</name>
<email>ka-cheong.poon@oracle.com</email>
</author>
<published>2019-09-11T09:58:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c5c1a030a7dbf8dd4e1fa4405ae9a89dc1d2a8db'/>
<id>urn:sha1:c5c1a030a7dbf8dd4e1fa4405ae9a89dc1d2a8db</id>
<content type='text'>
In rds_bind(), an rds_sock is added to the RDS bind hash table before
rs_transport is set.  This means that the socket can be found by the
receive code path when rs_transport is NULL.  And the receive code
path de-references rs_transport for congestion update check.  This can
cause a panic.  An rds_sock should not be added to the bind hash table
before all the needed fields are set.

Reported-by: syzbot+4b4f8163c2e246df3c4c@syzkaller.appspotmail.com
Signed-off-by: Ka-Cheong Poon &lt;ka-cheong.poon@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mac80211: Do not send Layer 2 Update frame before authorization</title>
<updated>2019-09-11T13:59:26Z</updated>
<author>
<name>Jouni Malinen</name>
<email>jouni@codeaurora.org</email>
</author>
<published>2019-09-11T13:03:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e493173b7841259a08c5c8e5cbe90adb349da7e'/>
<id>urn:sha1:3e493173b7841259a08c5c8e5cbe90adb349da7e</id>
<content type='text'>
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-ASSOCIATE.indication, i.e.,
before completing 4-way handshake. However, this IEEE trial-use
recommended practice document was published before RSN (IEEE Std
802.11i-2004) and as such, did not consider RSN use cases. Furthermore,
IEEE Std 802.11F-2003 was withdrawn in 2006 and as such, has not been
maintained amd should not be used anymore.

Sending out the Layer 2 Update frame immediately after association is
fine for open networks (and also when using SAE, FT protocol, or FILS
authentication when the station is actually authenticated by the time
association completes). However, it is not appropriate for cases where
RSN is used with PSK or EAP authentication since the station is actually
fully authenticated only once the 4-way handshake completes after
authentication and attackers might be able to use the unauthenticated
triggering of Layer 2 Update frame transmission to disrupt bridge
behavior.

Fix this by postponing transmission of the Layer 2 Update frame from
station entry addition to the point when the station entry is marked
authorized. Similarly, send out the VLAN binding update only if the STA
entry has already been authorized.

Signed-off-by: Jouni Malinen &lt;jouni@codeaurora.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
