From mboxrd@z Thu Jan 1 00:00:00 1970 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 ADFAD13DDC0; Wed, 19 Jun 2024 13:34:58 +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=1718804098; cv=none; b=KohEi8i1/yszu4rTAsyuDnYamQHsL+To3kib7TNE88iWKIcu7M7+KlqNm7x/b2/+GfPOGRlO/0+TsOHglI9gMHvfl4zdOsnCRasrDj9uEl2xs2qyzi8OhbLv0ucgCKYvbbpD3V/wm0Rs/IbMEwzGVFgCOVMq8Gqeg28KUe5co3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718804098; c=relaxed/simple; bh=hJqO9DvBVcUBQ9Wqwdz/5ty/dGecJgyn+6b2hl45Tu4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OdSM0uOk2HznvZgTTt3uGipB8O8QlGtVLFts4nJjoBSJOaHUq5EY3YCwZz+PXp1BFDRiCeJc+7aN1+HmVFYzKxF9SBmIC46Eyl6FIJAXcQ2oY1v21ayeRyixlFOdZ1eC3wYt0yHO+JHVSIs4HMrkKZykAJTtVdrPDEavE3YeFCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=clQ980Ra; 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="clQ980Ra" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2ACD7C2BBFC; Wed, 19 Jun 2024 13:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718804098; bh=hJqO9DvBVcUBQ9Wqwdz/5ty/dGecJgyn+6b2hl45Tu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=clQ980Ra6VkY4uwnpSyaT/SAKvfUz8SCHa75xTumDWMbqI8WoVMzoeAUnm501E8tV 6JX5NeutgMeVxbufUraxaniHyeiuZ0QIQQ993ydwMadpD3lLa7HGQhvPklWR8QrTqL ASC9cmqWAZNIoB1gRXY0cTDQqCOdm2RxQ5G4yTUs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mat Martineau , Christoph Paasch , Paolo Abeni , "Matthieu Baerts (NGI0)" , Jakub Kicinski Subject: [PATCH 6.1 167/217] mptcp: ensure snd_una is properly initialized on connect Date: Wed, 19 Jun 2024 14:56:50 +0200 Message-ID: <20240619125603.133472590@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619125556.491243678@linuxfoundation.org> References: <20240619125556.491243678@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paolo Abeni commit 8031b58c3a9b1db3ef68b3bd749fbee2e1e1aaa3 upstream. This is strictly related to commit fb7a0d334894 ("mptcp: ensure snd_nxt is properly initialized on connect"). It turns out that syzkaller can trigger the retransmit after fallback and before processing any other incoming packet - so that snd_una is still left uninitialized. Address the issue explicitly initializing snd_una together with snd_nxt and write_seq. Suggested-by: Mat Martineau Fixes: 8fd738049ac3 ("mptcp: fallback in case of simultaneous connect") Cc: stable@vger.kernel.org Reported-by: Christoph Paasch Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/485 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240607-upstream-net-20240607-misc-fixes-v1-1-1ab9ddfa3d00@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/mptcp/protocol.c | 1 + 1 file changed, 1 insertion(+) --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3757,6 +3757,7 @@ static int mptcp_connect(struct sock *sk WRITE_ONCE(msk->write_seq, subflow->idsn); WRITE_ONCE(msk->snd_nxt, subflow->idsn); + WRITE_ONCE(msk->snd_una, subflow->idsn); if (likely(!__mptcp_check_fallback(msk))) MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPCAPABLEACTIVE);