Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3663309pxb; Mon, 24 Jan 2022 14:47:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcOW01vFpTReTxIVXwn+cSJ+6B0UqScIoZ85z4YuQlJnrv2S9Wknve1/P39O3aoMqyb79g X-Received: by 2002:a17:902:e841:b0:14b:661c:f92c with SMTP id t1-20020a170902e84100b0014b661cf92cmr2979906plg.171.1643064449522; Mon, 24 Jan 2022 14:47:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643064449; cv=none; d=google.com; s=arc-20160816; b=mAc62B4B6jDYTNC61KNt0yskmNaMAIIIw3Vi13SbH6ORr+boWLKkdB3lCi0pGd53Sh 9Uct2yOsTsemClD3etg/U9cnbRXeTcAZmyJp3TVimAaHlVnGcvti/r7jawCKEZRSvmgF wV8Z/0m+woi0Ll3ywtjx+TbHBdxVp1wU0znQpaFR74dPXqCenXe51JE4jCokwiHhEbgs gFBHKTEDKjD4wrRcns3yUudXspTZy0/BDOi4alQcLAza7dNSXgTo5grCNCw8YSaDax9I xE93yNFGs8rdCNo3SGugulz2GS95wiatviwzTD/DjUDFjURUKkQrKVXfO+y9OeDUEx1O VnGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nv0bTq7iLmsS5fPdyhyWOY409Fu5eC1BWQk8uKm5wQc=; b=rH1sAR88OJ6/F77QbkWC9PpFq8I5yy5HroFUO23gqdX5WKrbiOyhaGH4uGrsBWYkDL EWTgoX4y/LzdEWC0IQmXUpSM8bbk/R9w/lFVO4sDHu9MZbYCfA3icNqegz0sUD2r5MvG HcwfXkoYASjK7232c36ZtGsj/IJXKI3DM+teThhhUE33Y2huXvCg9+81JjPoZxrI+OF+ mBQiKoZtnE7k5jyme+avjkIuChxuYfDFGQXpSo9W7pNH8zseqklPFo7zvw1DPPQQgwl9 pxecg2iZBRSj06RM+FnFTZCT0Kd5Pe82G38ki7IqEqrHBVwvuEHkQnlx6qBk/mx9L6LS Xniw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jrX0rqVR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a64si11979501pge.330.2022.01.24.14.47.15; Mon, 24 Jan 2022 14:47:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jrX0rqVR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1837677AbiAXWpA (ORCPT + 99 others); Mon, 24 Jan 2022 17:45:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1456759AbiAXVj5 (ORCPT ); Mon, 24 Jan 2022 16:39:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F926C07E303; Mon, 24 Jan 2022 12:27:21 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1D49C61383; Mon, 24 Jan 2022 20:27:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAB9CC340E5; Mon, 24 Jan 2022 20:27:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056040; bh=O2Ysi3QOPVS30w94JiKKVKbDFHliCexu7E4GF6K1WiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jrX0rqVRKUrGy2pCj6AGFzcKGvCjjXPWaI1dK+PzCrk6+pQ/ZSRA9ohCUGzfVjdMl z0h+6tnH6QXsFIma8orthHClO25b1UhiNr8Q5PI59AzRHju8aObQ54Ge7DlNnSwOkL LC6l/tcA0ioEo3+y1r91uzEMJTGtKUtlB5dIZPyM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthieu Baerts , Geliang Tang , Mat Martineau , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 350/846] mptcp: fix a DSS option writing error Date: Mon, 24 Jan 2022 19:37:47 +0100 Message-Id: <20220124184113.027769675@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geliang Tang [ Upstream commit 110b6d1fe98fd7af9893992459b651594d789293 ] 'ptr += 1;' was omitted in the original code. If the DSS is the last option -- which is what we have most of the time -- that's not an issue. But it is if we need to send something else after like a RM_ADDR or an MP_PRIO. Fixes: 1bff1e43a30e ("mptcp: optimize out option generation") Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/mptcp/options.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index f69a1cadb13fc..e515ba9ccb5d8 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1321,6 +1321,7 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp, put_unaligned_be32(mpext->data_len << 16 | TCPOPT_NOP << 8 | TCPOPT_NOP, ptr); } + ptr += 1; } } else if ((OPTION_MPTCP_MPC_SYN | OPTION_MPTCP_MPC_SYNACK | OPTION_MPTCP_MPC_ACK) & opts->suboptions) { -- 2.34.1