Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3412588rwa; Tue, 23 Aug 2022 04:28:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR5tNykZkVAyVxjj+irvbaDdEBvntWaIXSrCAXmpI8wyhMzZjLL7AZiGlVfI6LmmplN6mxCS X-Received: by 2002:a05:6402:1e8a:b0:43e:93ab:5ab8 with SMTP id f10-20020a0564021e8a00b0043e93ab5ab8mr3282367edf.211.1661254128906; Tue, 23 Aug 2022 04:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254128; cv=none; d=google.com; s=arc-20160816; b=sJjGSgC/frDYd7ATl8NlKDuvSfjlUDGPsEqB/OMBZks7seP6lsMKqxoM1rx/o/oULR Aho0p71erviBFlZt2KMAQ+wXSTcAGSITurBQauDIH3QaxKB/0ZuSQZXy48xuGOLR6ajT dWb6HFg/KMwph+DSDP7M+ZbHnd0xcUeHTIfWB67ZtAF0w+VqCcikmd7jor3egZ25rf6i /o8o9V1cgBHRbfP3z7E+CQXhdEWOusZvnfL1JlPuoqSclh7AqyyXwzxEto5bWJrJDVhY 9cT0ScSvM5z6NpZe6P2CLAGP5ErBG1LsXrKi/hMyNFNknXstiuHjPLNw6EQfA2xrqWHD nj1w== 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=km3/6cduszbddjz0I/SjzsjEA4pTEMFhMJDDoMZyHv8=; b=MweO2qTYCMeOM9mi0YeuYkjK+Q9JekUS5P7TPHD1qea/Mi9P74FCoiRKJK6HhKEl9E O3rvmeB+FJ8qn8ylOAR3jSGe5mg21k3LhO03qgPQXz69APY6xIq7sxR2zRf4ChrlQRCw h1HMbJQGH33P+l+++qEFkXnhC2IsdxF9BP+32GAilmzcrkFZe9ZHTNy0UwbBEqrcxvqV fvqyhIHyqbsVU8DN3bF3ikP7DIcJsSAXAZlgVfVF1qh8xcRRqEUsr9jYvNOMI6AZiBjm FTuKMlYQFl4HyV0t0WdbwQ9cE9YHmi1cvlTVegfsa0JQ/kd+X5ZvQ5spOSjO/4Q5TsA3 efXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wqm2P+kj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq6-20020a1709073f0600b00730c9a41812si14376846ejc.723.2022.08.23.04.28.21; Tue, 23 Aug 2022 04:28:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Wqm2P+kj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1352968AbiHWKJs (ORCPT + 99 others); Tue, 23 Aug 2022 06:09:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352696AbiHWKCV (ORCPT ); Tue, 23 Aug 2022 06:02:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 770417C741; Tue, 23 Aug 2022 01:50:30 -0700 (PDT) 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 0635F6122F; Tue, 23 Aug 2022 08:50:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D687C433D6; Tue, 23 Aug 2022 08:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244629; bh=7XvzYG1/pjFVKJRC1vdT57a3gpQ/VTg3095N79BMJe8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wqm2P+kjjpAQ0i09Ovk+mC2xEgzXV/213ZKlnaQ6rfIEpimk6WuLxI2aa3WRTqHZA 5CERb7Jix20PbRvsY7IuQf0WgcOEmGFae3E6UYOa6CizFz/GBm8p5M6FzPwu/up4Da XPV5PqCCiBa0kbCQaJWyOlk43IUeZSIfjkzZC0oI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH 5.15 125/244] netfilter: nf_tables: disallow NFTA_SET_ELEM_KEY_END with NFT_SET_ELEM_INTERVAL_END flag Date: Tue, 23 Aug 2022 10:24:44 +0200 Message-Id: <20220823080103.250852622@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pablo Neira Ayuso commit 4963674c2e71fc062f8f089f0f58ffbb5533060b upstream. These are mutually exclusive, actually NFTA_SET_ELEM_KEY_END replaces the flag notation. Fixes: 7b225d0b5c6d ("netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attribute") Signed-off-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman --- net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+) --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -5768,6 +5768,7 @@ static int nft_add_set_elem(struct nft_c nla[NFTA_SET_ELEM_EXPIRATION] || nla[NFTA_SET_ELEM_USERDATA] || nla[NFTA_SET_ELEM_EXPR] || + nla[NFTA_SET_ELEM_KEY_END] || nla[NFTA_SET_ELEM_EXPRESSIONS])) return -EINVAL;