linux/net/mptcp
Paolo Abeni 4c0288299f mptcp: prevent tcp diag from closing listener subflows
The MPTCP protocol does not expect that any other entity could change
the first subflow status when such socket is listening.
Unfortunately the TCP diag interface allows aborting any TCP socket,
including MPTCP listeners subflows. As reported by syzbot, that trigger
a WARN() and could lead to later bigger trouble.

The MPTCP protocol needs to do some MPTCP-level cleanup actions to
properly shutdown the listener. To keep the fix simple, prevent
entirely the diag interface from stopping such listeners.

We could refine the diag callback in a later, larger patch targeting
net-next.

Fixes: 57fc0f1cea ("mptcp: ensure listener is unhashed before updating the sk status")
Cc: stable@vger.kernel.org
Reported-by: <syzbot+5a01c3a666e726bc8752@syzkaller.appspotmail.com>
Closes: https://lore.kernel.org/netdev/0000000000004f4579060c68431b@google.com/
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
Link: https://lore.kernel.org/r/20231226-upstream-net-20231226-mptcp-prevent-warn-v1-2-1404dcc431ea@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-01-02 16:12:47 -08:00
..
bpf.c bpf: Add update_socket_protocol hook 2023-08-16 10:22:16 -07:00
crypto_test.c mptcp: fill in missing MODULE_DESCRIPTION() 2023-12-17 20:54:22 +00:00
crypto.c
ctrl.c mptcp: add a new sysctl for make after break timeout 2023-10-25 12:23:33 -07:00
diag.c
fastopen.c mptcp: properly account fastopen data 2023-10-25 12:23:34 -07:00
Kconfig
Makefile net: mptcp: use policy generated by YAML spec 2023-10-24 13:00:32 -07:00
mib.c mptcp: introduces more address related mibs 2023-05-18 20:06:32 -07:00
mib.h mptcp: introduces more address related mibs 2023-05-18 20:06:32 -07:00
mptcp_diag.c net: fill in MODULE_DESCRIPTION()s for SOCK_DIAG modules 2023-11-19 20:09:13 +00:00
mptcp_pm_gen.c net: mptcp: use policy generated by YAML spec 2023-10-24 13:00:32 -07:00
mptcp_pm_gen.h net: mptcp: use policy generated by YAML spec 2023-10-24 13:00:32 -07:00
options.c mptcp: fix uninit-value in mptcp_incoming_options 2023-11-24 14:58:33 +00:00
pm_netlink.c mptcp: add validity check for sending RM_ADDR 2023-11-14 20:10:20 -08:00
pm_userspace.c mptcp: define more local variables sk 2023-10-27 08:47:30 -07:00
pm.c mptcp: drop useless ssk in pm_subflow_check_next 2023-10-27 08:47:30 -07:00
protocol.c mptcp: fix inconsistent state on fastopen race 2023-12-17 20:54:22 +00:00
protocol.h mptcp: fix inconsistent state on fastopen race 2023-12-17 20:54:22 +00:00
sched.c mptcp: register default scheduler 2023-08-22 17:31:19 -07:00
sockopt.c mptcp: fix setsockopt(IP_TOS) subflow locking 2023-11-14 20:10:20 -08:00
subflow.c mptcp: prevent tcp diag from closing listener subflows 2024-01-02 16:12:47 -08:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token_test.c mptcp: fill in missing MODULE_DESCRIPTION() 2023-12-17 20:54:22 +00:00
token.c mptcp: add statistics for mptcp socket in use 2023-01-09 07:30:50 +00:00