Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 552A637F8C1; Thu, 20 Aug 2026 15:11:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238709; cv=none; b=PqA1fGkZZd+BumHZrqK2vZ64QISoJKMjpW0Fy5LkSyWTbn4Lc7j43DmH9OTwfn4lv7/Ara5fWzUhWwBcPt2d4FcHYpwspZuoO4gB8N1upchcA81iHYqjlAu+RkKYar6xce7orkkS7YUfjwW30rski6yugLgRdzJTsD1qFf+kCKM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787238709; c=relaxed/simple; bh=XyE4S4lBWMPi73htq1DxomuEZXtBAJTd/NAN29/6z34=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D2cNrmxZTMBfxJVT4ArAJxVJHfo/m2FoYw240ab6hSfXxPqILEqzEGlgkZJx8vRQ99+WXMmcLB1yZR4fiX44K+g0DMuVLVB3dXfrQyl26Wo+FyngA9arR0x74nrgQFONRLWVafjDauRyt2ildjlC6BFM0iHTxewzbxjCozdRE7w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Dh1b58fm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Dh1b58fm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1CF81F000E9; Thu, 20 Aug 2026 15:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787238708; bh=BKS3ot9h0qtJGXhgKmv2l9Ah5+VR4bRXis+1iru5oCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Dh1b58fmdiWWnzTRhZwZQFi/Y/Re44VjdWEv4q/fOUTbKuKEBXpg4z7FqzY2tkXH8 PSgZTNR/XrP8jJp9yjzD65ZByAaIHjLJktG+tARavrHqGAqSKIIphCdZEKIufQWVJz KFbDFOroEbKjYdIGy0vsaV9Fh1mJBtUc5WiNQAHU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Matthieu Baerts (NGI0)" , Jakub Kicinski Subject: [PATCH 6.18 014/217] mptcp: options: reset DSS fields in case of unexpected size Date: Thu, 20 Aug 2026 16:53:02 +0200 Message-ID: <20260820145238.059958726@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145237.531699751@linuxfoundation.org> References: <20260820145237.531699751@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Matthieu Baerts (NGI0) commit 35772b4981f38ba8059372cde8753e8e477e98ec upstream. A remote peer could send a malformed DSS with a wrong size, followed by another DSS or MPC + Data. In this case, the first suboption will be ignored, but leaving some fields written, which could lead to inconsistency or access uninitialized data. Explicitly reset the fields that could have been modified in case of unexpected size. Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260728-net-mptcp-misc-fixes-7-2-rc6-v1-0-f7e2d229159d%40kernel.org?part=1 Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260803-net-mptcp-misc-fixes-7-2-rc6-v2-1-b8f496d71664@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/mptcp/options.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -209,8 +209,14 @@ static void mptcp_parse_option(const str * RFC 8684 Section 3.3.0 checks later in subflow_data_ready */ if (opsize != expected_opsize && - opsize != expected_opsize + TCPOLEN_MPTCP_DSS_CHECKSUM) + opsize != expected_opsize + TCPOLEN_MPTCP_DSS_CHECKSUM) { + mp_opt->dsn64 = 0; + mp_opt->use_map = 0; + mp_opt->ack64 = 0; + mp_opt->use_ack = 0; + mp_opt->data_fin = 0; break; + } mp_opt->suboptions |= OPTION_MPTCP_DSS; if (mp_opt->use_ack) {