From nobody Fri Nov 22 07:24:35 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4E5F1E871; Wed, 4 Sep 2024 14:33:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725460385; cv=none; b=fd5LdJf8G59rHSMsiIgn6ZCWy0W6os+7smnd8gzrFhFRnCKYVyeDURpxm07CbsyU0FVPkTZ0y/YtZwbzPS0RJ8xFF9r5Ofa5wDZrgjvaV7LxjyeWYd3AcEVQ1zN7XIxvApVjMum16DRvqOAEVsv4VwaloUMlg16mydwYes0b1x4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725460385; c=relaxed/simple; bh=htzQFG2JF5jjP4HIUqACMQmdMnoNwJJqXVVJI+khLUw=; h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=e0AkyFN+4703CGMoG6PztFT2P1wq5q0heswcC7+qzA8uaMoUKmg+uYplCZAkW/Pkfm3LGIbq1JIgVXW3ceQMZ1Q/T1Nmf76jLlJgTk/0exyQM00UYC90VdvuyeC0gHfkobNSHYJYUTleoOO1sP8p+RpCWDl9KVsGWpgVtzrOhRg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UZu3KEdT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="UZu3KEdT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21AF0C4CEC2; Wed, 4 Sep 2024 14:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725460385; bh=htzQFG2JF5jjP4HIUqACMQmdMnoNwJJqXVVJI+khLUw=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=UZu3KEdT7jo/tgrsp0CwuyFDiEQiIWvx0lQOsFqdGnDlI13+3XbKJwZJyj1/B4oS0 Y09XbFMQrHSPnqgEUHzvxpLKLumbIf/eHaKg3VyvvF8EB0W7I/QN+keVLgrfNWry4E cqEfr0QrmRBTGKuJ5tJ2pQwQi1NBU52PXDxK5bRk= Subject: Patch "mptcp: pm: reuse ID 0 after delete and re-add" has been added to the 6.1-stable tree To: gregkh@linuxfoundation.org,martineau@kernel.org,matttbe@kernel.org,mptcp@lists.linux.dev,pabeni@redhat.com Cc: From: Date: Wed, 04 Sep 2024 16:32:51 +0200 In-Reply-To: <20240904110306.4082410-5-matttbe@kernel.org> Message-ID: <2024090451-embezzle-dexterous-b8fc@gregkh> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-stable: commit X-Patchwork-Hint: ignore Content-Type: text/plain; charset="utf-8" This is a note to let you know that I've just added the patch titled mptcp: pm: reuse ID 0 after delete and re-add to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=3Dlinux/kernel/git/stable/stable-queue.git= ;a=3Dsummary The filename of the patch is: mptcp-pm-reuse-id-0-after-delete-and-re-add.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. From stable+bounces-73005-greg=3Dkroah.com@vger.kernel.org Wed Sep 4 13:04= :05 2024 From: "Matthieu Baerts (NGI0)" Date: Wed, 4 Sep 2024 13:03:08 +0200 Subject: mptcp: pm: reuse ID 0 after delete and re-add To: mptcp@lists.linux.dev, stable@vger.kernel.org, gregkh@linuxfoundation.o= rg Cc: "Matthieu Baerts (NGI0)" , Mat Martineau , Paolo Abeni Message-ID: <20240904110306.4082410-5-matttbe@kernel.org> From: "Matthieu Baerts (NGI0)" commit 8b8ed1b429f8fa7ebd5632555e7b047bc0620075 upstream. When the endpoint used by the initial subflow is removed and re-added later, the PM has to force the ID 0, it is a special case imposed by the MPTCP specs. Note that the endpoint should then need to be re-added reusing the same ID. Fixes: 3ad14f54bd74 ("mptcp: more accurate MPC endpoint tracking") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Paolo Abeni Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Greg Kroah-Hartman --- net/mptcp/pm_netlink.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/net/mptcp/pm_netlink.c +++ b/net/mptcp/pm_netlink.c @@ -600,6 +600,11 @@ static void mptcp_pm_create_subflow_or_s =20 __clear_bit(local.addr.id, msk->pm.id_avail_bitmap); msk->pm.add_addr_signaled++; + + /* Special case for ID0: set the correct ID */ + if (local.addr.id =3D=3D msk->mpc_endpoint_id) + local.addr.id =3D 0; + mptcp_pm_announce_addr(msk, &local.addr, false); mptcp_pm_nl_addr_send_ack(msk); =20 @@ -624,6 +629,11 @@ subflow: =20 msk->pm.local_addr_used++; __clear_bit(local.addr.id, msk->pm.id_avail_bitmap); + + /* Special case for ID0: set the correct ID */ + if (local.addr.id =3D=3D msk->mpc_endpoint_id) + local.addr.id =3D 0; + nr =3D fill_remote_addresses_vec(msk, &local.addr, fullmesh, addrs); if (nr =3D=3D 0) continue; Patches currently in stable-queue which might be from matttbe@kernel.org are queue-6.1/mptcp-pm-fix-rm_addr-id-for-the-initial-subflow.patch queue-6.1/selftests-mptcp-join-validate-fullmesh-endp-on-1st-sf.patch queue-6.1/mptcp-pm-fix-id-0-endp-usage-after-multiple-re-creations.patch queue-6.1/mptcp-make-pm_remove_addrs_and_subflows-static.patch queue-6.1/mptcp-pm-avoid-possible-uaf-when-selecting-endp.patch queue-6.1/mptcp-pm-reuse-id-0-after-delete-and-re-add.patch queue-6.1/selftests-mptcp-join-check-re-adding-init-endp-with-id.patch queue-6.1/selftests-mptcp-join-test-for-flush-re-add-endpoints.patch queue-6.1/selftests-mptcp-add-explicit-test-case-for-remove-re.patch queue-6.1/selftests-mptcp-add-explicit-test-case-for-remove-readd.patch queue-6.1/selftests-mptcp-join-check-re-adding-init-endp-with-.patch queue-6.1/selftests-mptcp-join-check-re-using-id-of-closed-subflow.patch queue-6.1/mptcp-pm-fullmesh-select-the-right-id-later.patch queue-6.1/mptcp-pr_debug-add-missing-n-at-the-end.patch queue-6.1/selftests-mptcp-join-check-re-using-id-of-unused-add.patch queue-6.1/selftests-mptcp-join-check-re-using-id-of-unused-add_addr.patch