Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1909595imm; Thu, 24 May 2018 02:45:56 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqSVMt0vFft/lkeW3gs3yC1Np19+ViAA3qYYeE+HX+Ri/4X9j9ickChR84VhLz9RAsvVP0l X-Received: by 2002:a17:902:a586:: with SMTP id az6-v6mr6677920plb.210.1527155156456; Thu, 24 May 2018 02:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527155156; cv=none; d=google.com; s=arc-20160816; b=jltYwfuUcbE1IiL0FYGwudGWG8FEOLbnYN1bbRlyD517GaHBLssjCJXyVMNBk/UDNM TtdMsQGVDfnofG9f8ciWpDubBQipx1xz4mpUp1kjuctoHJjhPs3d/FPtgrxq9w3qGw1r Nwc01ggdhW1KVKNjqUSeWQ/SW9qjMik+RkpKqBV8te1J4FoaY4AJ8j+qUXM6+TEMm/cG IuGiAB7MKb7j+6KfZwHPE5SH6IgUGlzXe1WSnN7pHxyXBDkirKznaH8CThRKiQCw20/V Mms3a1+QWWNal1Py/ELCwnooHh9ZrmPhh60MRRaHWbeeM3xWupSFlPHv6i4JxCpC1krq UzCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=IKXTcH4/plMCCbX0RDtrPVTdnYkFXW/Xnn2aleSGxyI=; b=uG/JeWr4Hga3JVKcW6afuq/Pjqx0MT3enooJ20V3cFCVusO5CP3jzBICM8KpCsGE6b SYoIMLH6DEgW90XNILFm5n7xOJo+OFlFJ5s5IYNZgKRSU7OKQZtFOyF7FD3PeJRI4TpK K1KAasXoCgozTF4K5odVWyqQ3Bty1hzKwXju/1hnPo17baI2/0pV4CLayxna3dS7woSH N3gRC/oC9jF/49y7kS2zLNIy7E8NZ68lmUJx1Me9VXMU3f7j1Hgb70TC6JDgGVH8rn2T hGwz1mUfPkKXmNtKs9xUbWhvkV9yNLBqMuIvHAWGQ6bpbjGFW2SLaKE1Kk7a03sczmk8 BPyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kXnyVyx2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x28-v6si21360809pfa.37.2018.05.24.02.45.42; Thu, 24 May 2018 02:45:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kXnyVyx2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966697AbeEXJot (ORCPT + 99 others); Thu, 24 May 2018 05:44:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:55964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966686AbeEXJon (ORCPT ); Thu, 24 May 2018 05:44:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A55C7208D8; Thu, 24 May 2018 09:44:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155083; bh=0eVzvK3G0S0DihK8gATH81+v9hAYHnDQP8WroVEh3oM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kXnyVyx224mBaptXZ84hcfp0fCFI4Vgq9KFt40zI7RJAXqYAXQR24jV9YRuFqaO/1 2qO015GlxEgrbLkrIjbYm8ruKEU5W+I4sSPvZT0ICz3+MTlzAxa/ITOpG2qjlM4wI8 Iw38BCLETrur0xen0+f9qh47Z75mx8dzW+aKUjgo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xin Long , Neil Horman , Marcelo Ricardo Leitner , "David S. Miller" Subject: [PATCH 4.4 14/92] sctp: use the old asoc when making the cookie-ack chunk in dupcook_d Date: Thu, 24 May 2018 11:37:51 +0200 Message-Id: <20180524093200.536707515@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093159.286472249@linuxfoundation.org> References: <20180524093159.286472249@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xin Long [ Upstream commit 46e16d4b956867013e0bbd7f2bad206f4aa55752 ] When processing a duplicate cookie-echo chunk, for case 'D', sctp will not process the param from this chunk. It means old asoc has nothing to be updated, and the new temp asoc doesn't have the complete info. So there's no reason to use the new asoc when creating the cookie-ack chunk. Otherwise, like when auth is enabled for cookie-ack, the chunk can not be set with auth, and it will definitely be dropped by peer. This issue is there since very beginning, and we fix it by using the old asoc instead. Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/sctp/sm_statefuns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -1959,7 +1959,7 @@ static sctp_disposition_t sctp_sf_do_dup } } - repl = sctp_make_cookie_ack(new_asoc, chunk); + repl = sctp_make_cookie_ack(asoc, chunk); if (!repl) goto nomem;