linux/net/mptcp
Matthieu Baerts (NGI0) 902988b0ee Revert "mptcp: add needs_id for netlink appending addr"
[ Upstream commit 8e2760eaab ]

This commit was originally adding the ability to add MPTCP endpoints
with ID 0 by accident. The in-kernel PM, handling MPTCP endpoints at the
net namespace level, is not supposed to handle endpoints with such ID,
because this ID 0 is reserved to the initial subflow, as mentioned in
the MPTCPv1 protocol [1], a per-connection setting.

Note that 'ip mptcp endpoint add id 0' stops early with an error, but
other tools might still request the in-kernel PM to create MPTCP
endpoints with this restricted ID 0.

In other words, it was wrong to call the mptcp_pm_has_addr_attr_id
helper to check whether the address ID attribute is set: if it was set
to 0, a new MPTCP endpoint would be created with ID 0, which is not
expected, and might cause various issues later.

Fixes: 584f389426 ("mptcp: add needs_id for netlink appending addr")
Cc: stable@vger.kernel.org
Link: https://datatracker.ietf.org/doc/html/rfc8684#section-3.2-9 [1]
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260407-net-mptcp-revert-pm-needs-id-v2-1-7a25cbc324f8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[ adapted changes from pm_kernel.c to pm_netlink.c ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-04-18 10:33:37 +02: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: faster active backup recovery 2021-08-14 11:37:25 +01:00
diag.c mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size 2024-09-04 13:23:19 +02:00
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
mib.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:40:47 +02:00
mib.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-22 15:40:47 +02:00
mptcp_diag.c net: inet: Retire port only listening_hash 2023-11-28 16:56:22 +00:00
options.c mptcp: avoid unneeded subflow-level drops 2025-12-07 06:09:36 +09:00
pm.c mptcp: pm: avoid sending RM_ADDR over same subflow 2026-04-18 10:33:19 +02:00
pm_netlink.c Revert "mptcp: add needs_id for netlink appending addr" 2026-04-18 10:33:37 +02:00
protocol.c mptcp: fix slab-use-after-free in __inet_lookup_established 2026-04-18 10:33:35 +02:00
protocol.h mptcp: fix slab-use-after-free in __inet_lookup_established 2026-04-18 10:33:35 +02:00
sockopt.c mptcp: sockopt: make sync_socket_options propagate SOCK_KEEPOPEN 2025-10-02 13:39:01 +02:00
subflow.c mptcp: fix slab-use-after-free in __inet_lookup_established 2026-04-18 10:33:35 +02:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token_test.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00