From mboxrd@z Thu Jan 1 00:00:00 1970 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 63A5236212F; Thu, 20 Aug 2026 15:24:35 +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=1787239476; cv=none; b=iLwwz7CoTiMI0irwL89fIItQra7V9LVPGCke8KTpI5ClV1qoKhVEveeqI7OPIf5TE8+rcHxaysyAI2gji4Clt3VMM+1nGrYvvc3PiMttClltB4Xae8xtp9XfulrtudelKX0W7amNwNVRGjT2CsM2+sWtaXdoWdQ484QqFgax/bY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787239476; c=relaxed/simple; bh=K3ffe2ahfnzswySInLprX/VQR03DB2dLwoZR53OTYqw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R9XfcIwCZcHDui4JhrVv89A9XiIBMiQMSsndohetJvHlfDWVGB/UFZ3aon+SVCC8bohsVmCrtkwk6Q35qRUxl0+5rxfAl3r07TC0lFAPf0DmPEIvIotrUL1WaNM+eX2Re0VhAaSio+3N7Fs+o7HOaIGA8smcWu7B3mK88+8EtKE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jK9nX3hN; 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="jK9nX3hN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 840B81F00A3D; Thu, 20 Aug 2026 15:24:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787239475; bh=wkpEtBSvA5DZq2zgAQ6EzjLjaz3XM//SDptw8j/C7ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jK9nX3hNbk9Ys4Gs+l40cJ37SaJg//3fqYK4/vvKeieedmG9g38vf7psbAiMLtvPr oRLu8dY6LLf+ACnCdd2r3f8YO8qugpJ7xrX0KI5FTAHx3S0dtA9Fr+zrPK/U+0drCf t2SAkVK0mQIcDNJ+4dKf2rhg2cIf5jFh3/Qsjm/A= 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.12 022/220] mptcp: options: reset DSS fields in case of unexpected size Date: Thu, 20 Aug 2026 16:53:32 +0200 Message-ID: <20260820145224.172802417@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260820145223.480031205@linuxfoundation.org> References: <20260820145223.480031205@linuxfoundation.org> User-Agent: quilt/0.69 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.12-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) {