From nobody Thu Dec 18 13:02:27 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D359C32772 for ; Tue, 23 Aug 2022 09:13:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348872AbiHWJNR (ORCPT ); Tue, 23 Aug 2022 05:13:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348571AbiHWJKc (ORCPT ); Tue, 23 Aug 2022 05:10:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C9C86D558; Tue, 23 Aug 2022 01:31:05 -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 ams.source.kernel.org (Postfix) with ESMTPS id 615B6B81C3B; Tue, 23 Aug 2022 08:19:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90F55C433D6; Tue, 23 Aug 2022 08:19:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661242759; bh=vHPGp8AEhZpZ/FwWx4QLugFFEi7ycBigP5bAFx4OfiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MQuo9d7xnRiIb5Ewwsd4H7m5CQid4fGBpyU9a+53okIAOxjMwVfXG1lhforGrbzp3 iFjRl5NQsLpVwczifhymKGus4WrTikDgJsM0T0ZheYI/Fmrnd5NyjVp1ib1iv8P5HP tKk/ZMz1l79WPbFgEOBqgQP/tZiNz/ssCs+d3ldg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pablo Neira Ayuso Subject: [PATCH 5.19 191/365] netfilter: nf_tables: disallow NFTA_SET_ELEM_KEY_END with NFT_SET_ELEM_INTERVAL_END flag Date: Tue, 23 Aug 2022 10:01:32 +0200 Message-Id: <20220823080126.208106436@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 attri= bute") 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 @@ -5855,6 +5855,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;