Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3324543rwa; Tue, 23 Aug 2022 02:52:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR6U7eNVOHvsim7GGuKn7Kk6FBOKMLde9v4vrN6KH3PlJvKhFGw2KKZtj0wut8OMpU1h/cBA X-Received: by 2002:a17:90b:1e0c:b0:1f5:4e52:4866 with SMTP id pg12-20020a17090b1e0c00b001f54e524866mr2567010pjb.230.1661248329168; Tue, 23 Aug 2022 02:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248329; cv=none; d=google.com; s=arc-20160816; b=fzKs8zaDEw7Fw+ySpnpFj65zRESmV5DYudiRkSDJo8+dni5vGogOt19fMNrNsrNSQJ h03vSUBxADTzq2xgRa4BzuBUZZBLb8/+7K2sEYxeja91nPaI6NX4dkOpfwUEQK1KT4ov aRk/5dWjL3QZkfnFAZDufSdqe7RFp8puu/IjLTUYhP+HqvBetr3fjxT6qwznyoB75SkM B3Nj38Opj0GMqH2El71BE7ETPZkE8qmi3aIEa7Ryh8Lr7EudK+yBgFjzTh7sy3E+izaB H/xEp+6XRR+sl3m6MrLHx2Q537I7E1gz6gJrZu8TreJfdWViDISZMa6MFXSexxGaeAOE CnEg== 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=KAXDUfstKBTQU/hSt5z0KVnI7jYVEcSMi3N7cYhUqwY=; b=dp7z1E576x1PniwPRxqMGt3wWpXxkE+aKUdWpJKt71uYvg/eSfJQE+LTmp6L2w31i7 O4fKa1FwbtQ3YY1nrVegVJcM3Q/KL+6ugh4ucN3Kt28qf86/7355EHg4hKNg9ELaRrZQ tPxCtANzmFmbzJJ7wDJLrTG720zhVS5zphaMtuZZLR9+nUIMzeZhYLZjz/iwXaWDVXfN T8IezgyViDbO5bf50tMIAB7Yfr2G9btLTG7vW5HSkX4Ft+9/0J9JjuLj7UjbdyFOYJ/r 8rcAVGq6DWkm3Gf6BxKjkTXSFO+g5XeFOsJW2soS1re4ewNWI8elj9a7sbRjkEvUfebk BHlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MQuo9d7x; 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 u7-20020a170902e5c700b0016d70bd3fd6si17117413plf.77.2022.08.23.02.51.58; Tue, 23 Aug 2022 02:52:09 -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=MQuo9d7x; 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 S1348871AbiHWJNQ (ORCPT + 99 others); Tue, 23 Aug 2022 05:13:16 -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-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 @@ -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;