Article View: linux.kernel.netdev
Article #27149[PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR
From: "Matthieu Baerts (NGI0)"
Date: Fri, 04 Dec 2026 21:44
Date: Fri, 04 Dec 2026 21:44
59 lines
10902 bytes
10902 bytes
From: Josef Bacik <josef@toxicpanda.com>
mptcp_pm_remove_addr() gives up, and counts RmAddrTxDrop, if any bit of
pm.addr_signal is set. That dates from the time when the byte was
cleared as a whole after a signal had been sent. Since
commit 119c022096f5 ("mptcp: fix ADD_ADDR and RM_ADDR maybe flush
addr_signal each other") an ADD_ADDR, an echo and an RM_ADDR each clear
their own bit, and they have storage of their own: pm.local, pm.remote
and pm.rm_list_tx. mptcp_pm_announce_addr() looks at its own bit only.
The callers have updated their state by then and ignore the result: the
endpoint is gone, the announcement is forgotten, and the peer never
learns that the address is not valid any more.
When the bit of an echo is set at the arrival of the peer's ADD_ADDR,
it stays set until the PM worker has sent the ACK. An endpoint that is
removed in between loses its RM_ADDR.
Only a pending RM_ADDR stands in the way, as rm_list_tx would be
overwritten. The ACK that is sent at once carries the ADD_ADDR or the
echo then, and the RM_ADDR goes with a later packet. That is fine: an
ADD_ADDR, an echo and an RM_ADDR should rarely have to be sent at the
same time.
This issue has been found with the help of an LLM. It has not been
reproduced: the endpoint has to be removed before the PM worker sends
the pending ADD_ADDR or echo, a window that a Packetdrill script cannot
target. This fix is based on code inspection only, which is acceptable
here: the issue is clear from the code, and the fix is a one-liner.
Fixes: 119c022096f5 ("mptcp: fix ADD_ADDR and RM_ADDR maybe flush addr_signal each other")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[ Use mptcp_pm_should_rm_signal() instead of a comment. Fixes tag:
119c022096f5 instead of 42842a425ad6. Commit message: remove the
number of attempts, say which packet carries the RM_ADDR then, and
when the echo bit is set + how the issue was found, and why it is fine
without a reproducer. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index dacd3cf358f5..f12a8bfbb2a9 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -529,7 +529,7 @@ int mptcp_pm_remove_addr(struct mptcp_sock *msk, const struct mptcp_rm_list *rm_
pr_debug("msk=%p, rm_list_nr=%d\n", msk, rm_list->nr);
- if (rm_addr) {
+ if (mptcp_pm_should_rm_signal(msk)) {
MPTCP_ADD_STATS(sock_net((struct sock *)msk),
MPTCP_MIB_RMADDRTXDROP, rm_list->nr);
return -EINVAL;
--
2.55.0
Technical Details
Message-ID:
<20261204-net-next-mptcp-misc-feat-7-5-v1-3-1449de51adae@kernel.org>Path:
mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377652-linux-kernel-netdev=dewy.ruReferences:
<20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377652-linux-kernel-netdev=dewy.ru
From: matttbe@kernel.org ("Matthieu Baerts (NGI0)")
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next 03/10] mptcp: pm: don't drop an RM_ADDR because of an ADD_ADDR
Date: Fri, 04 Dec 2026 22:44:35 +0100
Organization: Usenet Network
Message-ID: <20261204-net-next-mptcp-misc-feat-7-5-v1-3-1449de51adae@kernel.org>
References: <20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network; logging-data="2878337"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:zPYY2L2TRz334ku7QQyKs8Wj16s= sha256:EYOKO7NpFA2T0j7hJtl+fd0G/JXQRFY2KSqEVojvsD0= sha1:z0G21CSrerr98QbaxeP5wDO8sjc= sha256:V3hwvMBFdHud91E++57M3qXOzr91+Px1GPJTMbE5akk=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 1FE33117CF8; Sat, 5 Dec 2026 00:45:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.542
X-Spam-Status: No, score=-3.542 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id prHeKv2BAOYL; Sat, 5 Dec 2026 00:45:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-377652-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 902B7117A66; Sat, 5 Dec 2026 00:45:15 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 0CE9F2B2DB; Fri, 4 Dec 2026 21:45:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796420708; b=yJobU0iPUqmQIVSX8zEBykrRUpw41sImGHucz9MtXo90qLaRDBPtInDdliTE+aQJhBmz QlZ3+jZNxeRuBe1TgAelW1VTRk1Sng/H/iBwkZZx1vtTe58AXuJrYWFqDeWbAhWMqNyeI BNWbh4b+2XcWAiXRnuBQ3viBPfIB/a42RdsftWDwLoEo7m8uKy/3ybWTqPS/ybqeJ4eZF ZUVzb4d5Nt1k6gQqTMW1W6PPEDsRAWzUxAGTjnYDtix7LetQrCDGUyeRdtnkcA5IsFLa9 Oon+HDeEV1gzccIAhdQ1D248FVWjckwFvC8JuRA8/4D86nprDEJHtdSoe3T/tVnHd4A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796420708; h=X-Original-To:Received:Received:DKIM-Signature:From:Date:Subject: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key; bh=LO8aFfHpSaZGER4IpP8jRqJSNlSglIG0r0cyjYz56DA=; b=d8EoaPICNVTPXdu0AakQeU3Q+5q1+/63iGt1j+W631Gdfb2qeSvW+b21/uyiVMe+0H9I T8/zWs8UDnDeB1Sh9ykzcpFReFBAPR7YQYOfY7XyqD/KDjmH8bKmkh2PD+AoZFjWX0zrB XyZesFtIWFZNjaLPLHCsyg0zPEE5l+/OZafZF6X0UV/K7smEJ93bHo2UR2SdHiqyvj9sl ClGQqLA37vr9kpMKzU6EwPzaB3AcoTVe5dj2azqeElvJij2AnQ6uRgoU2NzjroFBkr1Sl 4Rvu3E7DE1yS4VgFFzVdscXfDEg9k0ZnQd188tAQB3MP3uAZyWyAouLPoHGM4Ma2rMg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=G+6LqMNl; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EE7F606A336; Fri, 4 Dec 2026 21:45:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=G+6LqMNl
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796420707; b=g2FREGQt2ajyq4bAhjrNUJkqUW8FXjwUtXUS3IP1IOkuabds0p/SG2cc5QI3+t8cgSJP R8T4ztJaPSj4EKCkW/UXkImJt84GBjrXobNwq+Pj8lXRhV61e3azlV09F6xgeVqljitO0 NXCxBTC5YYAgRFWhdruHr9ESJyQ8y4cND2kOv1ZX7Qd5HYI6DZOCQq5VZ84+AFRBmt8wU oujL3XR380pfsjUp/4aAZUMDI9pChiF3gVqeAmnmcKakgdeEdWyEkuEf9jHzr+gCICNz6 ROltNNSclpW2PEgzCMUo1ujwpZkhpxx/A4uLWgNAw6P3hYUKv8/t4BYHoqE2USvItSg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796420707; h=Received:DKIM-Signature:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key; bh=LO8aFfHpSaZGER4IpP8jRqJSNlSglIG0r0cyjYz56DA=; b=TOHZir3RSesA2EpB+BWb98ncR1otXGaLd4Urs5eSRIfsbeP2ktkl4DP90mKAo7nBxE3r GSPU9pchzkmwTCcAaFCRI0gOz2HZ+qmn9uwIQO5U36MjdkmjEVAgvb2cG/TwtuNSpzcIs R4wAJcvANbULCYQivGFafi+gL10xiJvGD8TEVXKMMZZD9kX3SHYtVEpFnaOX8TVmiHy1r 09Ge2xvHd0lwbU1xEgHSf6h5XB7JsLHToEKXcVVy/a+zcEHM/BIo7JyijpG+v2kSKcJd7 wqeAY5q59qy9F0UOXhCLP6urdBdw/zMZSHfHWyy110ZPoH6fpp3/Si9tsbkKat4qs4Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=G+6LqMNl; arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEA31606A32D; Fri, 4 Dec 2026 21:45:07 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C68E51F0093B; Fri, 4 Dec 2026 21:45:04 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796420707; bh=LO8aFfHpSaZGER4IpP8jRqJSNlSglIG0r0cyjYz56DA=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=G+6LqMNlMu3ukEIpLb5lIsgczjKnwlBMv8ovGJun2JJpdct+UNoALmvCpB9rj3sVk jTkV5nzxnMKygZNfMmHp77Gxf8wzcIGazkJMgFw4jHGXIBki9BzwRmdNvdOfDDE40Z H1n5kvZWLOuE6Dju1e82svG1TG1R8q74/cxCi8/YepkAjro6iP51H94KcuuIU5DTNy EDXd8hCGJ1zfAQNxjWfzLC7BlESBHUC5qPth9mRIR7mX9E6E7pW1AQ6Kx6z14e2iE4 tpD9M4bsYqsZsGFjn+pOmSnpfcVw/dtqupLDodNR0EpQ3i5OLNEh7kEykBOLnDwBXW eBPdpQ7Ha6nQg==
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae@kernel.org>
X-Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev, linux-kselftest@vger.kernel.org, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, Josef Bacik <josef@toxicpanda.com>
X-Mailer: b4 0.16.0
X-Developer-Signature: v=1; a=openpgp-sha256; l=2580; i=matttbe@kernel.org; h=from:subject:message-id; bh=9WnwUEuQOzYpSovafhvBmaCHNO9qs45SpAaeo9qycWo=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGLKFTQJ3aXtMqzrw6ufzh0lRF3taPEXN/ytutxDyCme9p mzVv+hLRykLgxgXg6yYIot0W2T+zOdVvCVefhYwc1iZQIYwcHEKwEROLGD4H5cd/fdqyI5dhev/ 9xgXbS2Y3bv3RNq5+boO16RWhpiG9jL8z+4N5NF43fnh5K37HyYsm59ySrFmocI+9Q//d1huLzr 9nRkA
X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073
X-Received-Bytes: 10705