Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1648480pxy; Mon, 2 Aug 2021 07:03:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0BCXAbfy3rS4jpbWNzc7/I9lP9PPcsveNw1ct7Rpzcg5yk8EN0LbNBX3e7sPNv14jml0E X-Received: by 2002:a02:b190:: with SMTP id t16mr11611713jah.85.1627913020710; Mon, 02 Aug 2021 07:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627913020; cv=none; d=google.com; s=arc-20160816; b=E0mo5Lo+dldNocHZic43YXE3Xw8Ih+tfuT5SC+tZURZUAqtd/Dq81gKDs55hRLsVRp taH52flMb+Bfi0HgS5Nc6hmlApVrntQOZnraliOhzVW0Y1cCDlISyYYyBjtfcgnCNqf1 F6RzX3wML37RC4CStTOzJl1C+F/6LY/rV9v5JpSebpf3iLbuUYDsqvkqdFkISdBitLwj 93Wv4Rg6QjEmBNxuQCLBmlCXp4kkce8w74sTI8mzLJICXooT4+EjS1OWaav0XLscWuLW eiC4WQ19BDP0CNAjbqEdY71HAZbGePR1pVV50skDpGiLfExP25lHY/juxPVDE2uEDMj6 jxcQ== 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=PANrPoKY1HQjclr+FbDeMKGm8V3Vq/ESUVoRthclzsk=; b=WBszLwp3ZiYM0vNzNL0JtUzJcr3uMY8mtjL9jOE3A0SbjLz181oFgpt125xOhSfurl Zm3JDEB4FKa0TsbH3OFJjRenAn2SE9ckVSVkcXvKbvi9pAKo15UZ8dNQKz56uTAY040B OmVYfXUhv9i8bfzNVevmIkXj/R+kNx8PBMOKa7/SB5K4GMBaU/DZC05QPBpLjw3eBQEL v9+7m/wteTj5McQA6JGYjtAT9DJTS+jktT5G3A6kR4+O4LQVDuJAokYDuKb4qQ1H5jzX AgEwmmlhbPBLfR9ZDioVxuD0dBRzTUZaPDgC1ayHry4Fr2KK58Rxsi98LS36y9T6j7YQ ygbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ch2JeDTt; 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 x9si12766287jat.100.2021.08.02.07.03.28; Mon, 02 Aug 2021 07:03:40 -0700 (PDT) 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=Ch2JeDTt; 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 S234770AbhHBOCz (ORCPT + 99 others); Mon, 2 Aug 2021 10:02:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:34138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236278AbhHBNzM (ORCPT ); Mon, 2 Aug 2021 09:55:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 052CB611C4; Mon, 2 Aug 2021 13:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912428; bh=B9WDRWUz1X9xefLY/z+avPgVzyijOV2Eoxz+KKGs7oU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ch2JeDTt0RFdjZPX4dkSDVKPDImDfjqiSI5Ua2TRl293hnsElzecG664D+F73uHvj mZrhCcjScyoBckXTg69ll0Wowd3GRJh0WALdke5OYozBhFOEI01ktT0fQgoDRmMIMu QAFrSyPUi0cSfSrLGqfZ6FHsEe5F8gjvtVFjR/54= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Hutchings , Marcelo Ricardo Leitner , Xin Long , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 54/67] sctp: fix return value check in __sctp_rcv_asconf_lookup Date: Mon, 2 Aug 2021 15:45:17 +0200 Message-Id: <20210802134340.882877442@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134339.023067817@linuxfoundation.org> References: <20210802134339.023067817@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: Marcelo Ricardo Leitner [ Upstream commit 557fb5862c9272ad9b21407afe1da8acfd9b53eb ] As Ben Hutchings noticed, this check should have been inverted: the call returns true in case of success. Reported-by: Ben Hutchings Fixes: 0c5dc070ff3d ("sctp: validate from_addr_param return") Signed-off-by: Marcelo Ricardo Leitner Reviewed-by: Xin Long Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/sctp/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/input.c b/net/sctp/input.c index f72bff93745c..ddb5b5c2550e 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -1175,7 +1175,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup( if (unlikely(!af)) return NULL; - if (af->from_addr_param(&paddr, param, peer_port, 0)) + if (!af->from_addr_param(&paddr, param, peer_port, 0)) return NULL; return __sctp_lookup_association(net, laddr, &paddr, transportp); -- 2.30.2