Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3702441pxb; Mon, 24 Jan 2022 15:48:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzz2J7kT64SJ9gyZ9Pv3cF1Bka95OttwrEkqtrXQcccSfrr6LNcgpum5DQK+RcCa6hKwK4J X-Received: by 2002:a17:903:2451:b0:14b:60ca:edc8 with SMTP id l17-20020a170903245100b0014b60caedc8mr4144246pls.9.1643068114327; Mon, 24 Jan 2022 15:48:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068114; cv=none; d=google.com; s=arc-20160816; b=ALk76w5jiw8sgbl5WCa4i55Dm5BKh5rpWaXORikf475kKcro5z+2pku32R+Hrt4QK9 vfqPpy9k1SATBFfQUCCZ4DpZ6PBE7REXejRp1aNV0ATasmvN2GEGR0hZ0rj+VyYHv70q KEVYJVMNsHgUAJL8smVoUqTCV0mV9WQXewBcQosv2iS26OVmorgqZA4Hhjh+Ppq9LQ1J /5COKVWy7ULEk6zA+K/ZYxa68HUq6HSdg9rzAt66x//ChdWItlnmPcu91rESGwo/Cq8/ I+kOvMBMo5U6DT1OTbW7v9DN2LYuRsOqjxP92CsNvw+bLXFwyn2XsgV4rSmoGxISr7uR U/OQ== 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=K/G0amWuNBnLxNuP0LGh/VnZ3rkh2n7Fzh0pjv39Acc=; b=FRH5ed9lr6CfbekQ1l6YCD1NFhAZsjTX2DzV1KOCXaOrQCPk7HJiJrQd7DPwqF6cuj RotEo3uVfvTZmVQliL1kiRwiCDmvHf4Bkss7ohUDyDzaBPTT7gsp1KgfeEgZz0lqINks U48S2AwV6SWYio1xdwyBBaIHGC3rUyrm51Rr35reh2TTC5e8UVPkfn6k1SLPI1mT0A+B 9eXGm8eHOGuJJaXx2oBUHa1LXlxYGp0aJcScIvYy6Yg0DlI+AuGxy5yoeHhTmHLrfdpT kyz6swTovDWwfe2NqlbSgEU0fiaBfAJvZgRAyqEvMDRxGi8fvN+Z3wx/DTpwoFlnzqQO 9iEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UqD5U5SF; 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 s201si15110574pgs.328.2022.01.24.15.48.22; Mon, 24 Jan 2022 15:48:34 -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=UqD5U5SF; 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 S2362156AbiAXXlr (ORCPT + 99 others); Mon, 24 Jan 2022 18:41:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1842496AbiAXXB7 (ORCPT ); Mon, 24 Jan 2022 18:01:59 -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 4305FC0F0559; Mon, 24 Jan 2022 13:14:02 -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 C75036141C; Mon, 24 Jan 2022 21:14:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DF29C340E5; Mon, 24 Jan 2022 21:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058841; bh=ZoNkKVhcKuiwDIg6kQ1SLQk1hXz5ho2UjRj/10QBW00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UqD5U5SF5HCnr1yPnLOfJlqwiIc3fgeNJEWktTmpZDmOk8OdwL+DD7+PNEdK54avi sr7Fx5qWjndk712ufLY4NJ14KzN7O06SEKbJfKYjT8PApvuukcecAYv3tz+AImaH/v 8T6f14t0UDSZX4uL3zrCapxPT7RDHoX+0ypL+sho= 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.16 0420/1039] mptcp: fix a DSS option writing error Date: Mon, 24 Jan 2022 19:36:49 +0100 Message-Id: <20220124184139.422102200@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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 96c6efdd48bcc..6661b1d6520f1 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1319,6 +1319,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 (OPTIONS_MPTCP_MPC & opts->suboptions) { u8 len, flag = MPTCP_CAP_HMAC_SHA256; -- 2.34.1