From patchwork Mon Jun 1 17:55:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 225028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A181C433E0 for ; Mon, 1 Jun 2020 18:18:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D73E2206E2 for ; Mon, 1 Jun 2020 18:18:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035492; bh=seTGqVHM+PzsNvV/G5PEpXA8TcvoqEYo/jYqnVIjpww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vKxBdXkYpT1gxv6lmLoIoEDym3cS1qYDANu5eqvBdPuxGhBkisGgVO1zRLO/L5JBT LrVn8QE+dDcJrFW5bZpw8LPd0JRPJfKNfuu2wciecjPAUh5Shp++bPDmdpFB4FKkk2 SdnUtzTpjBXXmTvo3NsCYDWvzNduFQMp/nBnjnOQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731900AbgFASSL (ORCPT ); Mon, 1 Jun 2020 14:18:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:39738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731363AbgFASSJ (ORCPT ); Mon, 1 Jun 2020 14:18:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 EF5BF206E2; Mon, 1 Jun 2020 18:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035489; bh=seTGqVHM+PzsNvV/G5PEpXA8TcvoqEYo/jYqnVIjpww=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A/i1jz75MGTveODwEdbRB1Ltn2VHiSv1tJKMn9dBYD39RD09SmYB8Mndt26aNE6Jr WkTdNXdk4rjQ3ulWIy4XiElZmptNA/AcbwR+irBfV0ilcyfibQ3Dj48bCNGDVEQhcJ YugX+mVb178EqAIAm8HsSi+OzqfbxwccdQhcNVIE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Pablo Neira Ayuso Subject: [PATCH 5.6 175/177] netfilter: conntrack: comparison of unsigned in cthelper confirmation Date: Mon, 1 Jun 2020 19:55:13 +0200 Message-Id: <20200601174102.625366555@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174048.468952319@linuxfoundation.org> References: <20200601174048.468952319@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Pablo Neira Ayuso commit 94945ad2b330207cded0fd8d4abebde43a776dfb upstream. net/netfilter/nf_conntrack_core.c: In function nf_confirm_cthelper: net/netfilter/nf_conntrack_core.c:2117:15: warning: comparison of unsigned expression in < 0 is always false [-Wtype-limits] 2117 | if (protoff < 0 || (frag_off & htons(~0x7)) != 0) | ^ ipv6_skip_exthdr() returns a signed integer. Reported-by: Colin Ian King Fixes: 703acd70f249 ("netfilter: nfnetlink_cthelper: unbreak userspace helper support") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_conntrack_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -2090,7 +2090,7 @@ static int nf_confirm_cthelper(struct sk { const struct nf_conntrack_helper *helper; const struct nf_conn_help *help; - unsigned int protoff; + int protoff; help = nfct_help(ct); if (!help)