linux-stable/net/mptcp
Paolo Abeni 6c193b407f mptcp: ensure listener is unhashed before updating the sk status
commit 57fc0f1cea upstream.

The MPTCP protocol access the listener subflow in a lockless
manner in a couple of places (poll, diag). That works only if
the msk itself leaves the listener status only after that the
subflow itself has been closed/disconnected. Otherwise we risk
deadlock in diag, as reported by Christoph.

Address the issue ensuring that the first subflow (the listener
one) is always disconnected before updating the msk socket status.

Reported-by: Christoph Paasch <cpaasch@apple.com>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/407
Fixes: b29fcfb54c ("mptcp: full disconnect implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-28 11:14:07 +02:00
..
Kconfig
Makefile mptcp: implement delayed seq generation for passive fastopen 2022-11-29 20:24:25 -08:00
bpf.c bpf: Add bpf_skc_to_mptcp_sock_proto 2022-05-20 15:29:00 -07:00
crypto.c
crypto_test.c
ctrl.c mptcp: Add a per-namespace sysctl to set the default path manager type 2022-04-29 17:25:14 -07:00
diag.c
fastopen.c mptcp: fix NULL pointer dereference on fastopen early fallback 2023-04-13 09:58:55 -07:00
mib.c mptcp: add more offered MIBs counter 2022-05-05 19:00:16 -07:00
mib.h mptcp: add more offered MIBs counter 2022-05-05 19:00:16 -07:00
mptcp_diag.c tcp: Access &tcp_hashinfo via net. 2022-09-20 10:21:49 -07:00
options.c mptcp: use mptcp_schedule_work instead of open-coding it 2023-04-13 09:58:55 -07:00
pm.c mptcp: update userspace pm infos 2023-06-14 11:16:56 +02:00
pm_netlink.c mptcp: ensure listener is unhashed before updating the sk status 2023-06-28 11:14:07 +02:00
pm_userspace.c mptcp: update userspace pm infos 2023-06-14 11:16:56 +02:00
protocol.c mptcp: ensure listener is unhashed before updating the sk status 2023-06-28 11:14:07 +02:00
protocol.h mptcp: only send RM_ADDR in nl_cmd_remove 2023-06-14 11:16:56 +02:00
sockopt.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-02-09 12:25:40 -08:00
subflow.c mptcp: consolidate fallback and non fallback state machine 2023-06-28 11:14:07 +02:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: add statistics for mptcp socket in use 2023-01-09 07:30:50 +00:00
token_test.c mptcp: init sk->sk_prot in build_msk() 2023-01-09 07:30:50 +00:00