Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2071040imm; Thu, 24 May 2018 05:23:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpJ1DhywVKQJkDtcWMjYc2vrd3gaZ1yQB0OVOBNyzf12Z1ounSmWc3x4hRS1apRPlWSpCLM X-Received: by 2002:a62:3d54:: with SMTP id k81-v6mr7058610pfa.193.1527164604716; Thu, 24 May 2018 05:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527164604; cv=none; d=google.com; s=arc-20160816; b=dJydngcpo7m2d+J5X7xVvs+dWWAP9pjQhSppSX+pR7OO1c4ybr3E1SuZTsw2mIj/O+ Rk71r1ZfLQSe434B7t26dS/iq0ec+tBu2PYmPKATUewsecgQGRnCAUcvaZRXsxwwO6mQ MChhbj2jxoVlv/AdW0SK7emB+t+3wNviKmZoFg+k01Z/Ea/EATklMM1X5rpByRvvsc2F 5mj8pR0V0eGnU572VahZzNgU7fCJgMibsKxj1m/H7V1pFmE8fzRke8rbx4k1IdJbJVzk ikHC1CesjQKQXFhenHub/a/Khdol/O/FQ/ncsHTOZNbjYAg+5sB5hiT5n11E/V7H4AYs L5XQ== 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=tF4jM6f6D6WXlyIJTyI/DLVcFUIy/O4MDnDeVQDCteM=; b=rrZeP07vZLgr4uNitrEeFxRbTOzltAnDYAllRKpmLz7JmSiRX8NHP+zmnppWcIm2g8 AMq2BXy7ZgJxmK89N2nSrmqYd8wEjESQ5agDBPQ0ddryaFUzVr2+BYsfZJxDVmj/ZxoG a0IDgFFidqNmOi8eEpPdEKmjSCBAOIHtzn1aEryxuP9Z+hY+085p37/QqDrUwcParDvY QzeV6699aNSiYUiwr9zq5xTTaww8HtMA8ojqk2+nbvfiZlM+PJkYqnbdCKBPRT0mS3Zk kESU5+8OMISGNeUDmIz1cnDNeypoO3R+zPbU/PVDayvcTFE/X8CCSJ6rkqaff27+Hqzw +J6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZdH5B5c6; 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 z8-v6si21261188plk.539.2018.05.24.05.23.10; Thu, 24 May 2018 05:23:24 -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=ZdH5B5c6; 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 S966135AbeEXJlB (ORCPT + 99 others); Thu, 24 May 2018 05:41:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:52902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965759AbeEXJkw (ORCPT ); Thu, 24 May 2018 05:40:52 -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 9814620892; Thu, 24 May 2018 09:40:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527154852; bh=KORhMCRw8Kr1UN/lzScxkeqB+y6DTlkcltHXi6GJeH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZdH5B5c67aUVsNNI0bFcx31OPrcZxw0SNOVPtAKHPbTKNy8Uu9in+k1JmAVNKQjCY 5R+DB0xdODMYwEp5vqQrydHf4FzcD+tlTD9PPPrLBFB+0J990bvOh+I99LsTnTaz7P AtafmHKt42fer6MBfxfiYoMW0l/vafKnvza83deA= 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 3.18 11/45] sctp: use the old asoc when making the cookie-ack chunk in dupcook_d Date: Thu, 24 May 2018 11:38:19 +0200 Message-Id: <20180524093121.914402632@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093120.599252450@linuxfoundation.org> References: <20180524093120.599252450@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 3.18-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;