bianbu-linux-6.6/net/mptcp
Matthieu Baerts (NGI0) dc14d542e6 mptcp: pm: ADD_ADDR 0 is not a new address
commit 57f86203b41c98b322119dfdbb1ec54ce5e3369b upstream.

The ADD_ADDR 0 with the address from the initial subflow should not be
considered as a new address: this is not something new. If the host
receives it, it simply means that the address is available again.

When receiving an ADD_ADDR for the ID 0, the PM already doesn't consider
it as new by not incrementing the 'add_addr_accepted' counter. But the
'accept_addr' might not be set if the limit has already been reached:
this can be bypassed in this case. But before, it is important to check
that this ADD_ADDR for the ID 0 is for the same address as the initial
subflow. If not, it is not something that should happen, and the
ADD_ADDR can be ignored.

Note that if an ADD_ADDR is received while there is already a subflow
opened using the same address, this ADD_ADDR is ignored as well. It
means that if multiple ADD_ADDR for ID 0 are received, there will not be
any duplicated subflows created by the client.

Fixes: d0876b2284 ("mptcp: add the incoming RM_ADDR support")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-04 13:28:21 +02:00
..
bpf.c bpf: Add update_socket_protocol hook 2023-08-16 10:22:16 -07:00
crypto.c kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
crypto_test.c mptcp: move crypto test to KUNIT 2020-06-26 16:21:39 -07:00
ctrl.c mptcp: only allow set existing scheduler for net.mptcp.scheduler 2024-05-17 12:02:30 +02:00
diag.c mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size 2024-08-29 17:33:19 +02:00
fastopen.c mptcp: corner case locking for rx path fields initialization 2024-03-01 13:34:57 +01:00
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile mptcp: add struct mptcp_sched_ops 2023-08-22 17:31:18 -07:00
mib.c mptcp: mib: count MPJ with backup flag 2024-08-11 12:47:27 +02:00
mib.h mptcp: mib: count MPJ with backup flag 2024-08-11 12:47:27 +02:00
mptcp_diag.c tcp: Access &tcp_hashinfo via net. 2022-09-20 10:21:49 -07:00
options.c mptcp: fully established after ADD_ADDR echo on MPJ 2024-08-14 13:59:01 +02:00
pm.c mptcp: pm: ADD_ADDR 0 is not a new address 2024-09-04 13:28:21 +02:00
pm_netlink.c mptcp: pm: ADD_ADDR 0 is not a new address 2024-09-04 13:28:21 +02:00
pm_userspace.c mptcp: pm: fix backup support in signal endpoints 2024-08-14 13:59:01 +02:00
protocol.c mptcp: sched: check both backup in retrans 2024-09-04 13:28:20 +02:00
protocol.h mptcp: pm: ADD_ADDR 0 is not a new address 2024-09-04 13:28:21 +02:00
sched.c mptcp: register default scheduler 2023-08-22 17:31:19 -07:00
sockopt.c mptcp: prevent BPF accessing lowat from a subflow socket. 2024-08-11 12:47:28 +02:00
subflow.c mptcp: close subflow when receiving TCP+FIN 2024-09-04 13:28:20 +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