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 71960C77B7C for ; Fri, 5 May 2023 13:16:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232400AbjEENQw (ORCPT ); Fri, 5 May 2023 09:16:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232414AbjEENQt (ORCPT ); Fri, 5 May 2023 09:16:49 -0400 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BE40132 for ; Fri, 5 May 2023 06:16:46 -0700 (PDT) Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.94.2) (envelope-from ) id 1puvIg-0001CB-2t; Fri, 05 May 2023 15:16:42 +0200 Date: Fri, 5 May 2023 15:16:42 +0200 From: Phil Sutter To: Florian Westphal Cc: netfilter-devel@vger.kernel.org Subject: Re: [PATCH nf-next 0/3] netfilter: nf_tables: reject loads from uninitialized registers Message-ID: Mail-Followup-To: Phil Sutter , Florian Westphal , netfilter-devel@vger.kernel.org References: <20230505111656.32238-1-fw@strlen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230505111656.32238-1-fw@strlen.de> Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Hi! On Fri, May 05, 2023 at 01:16:53PM +0200, Florian Westphal wrote: > Keep a per-rule bitmask that tracks registers that have seen a store, > then reject loads when the accessed registers haven't been flagged. > > This changes uabi contract, because we previously allowed this. > Neither nftables nor iptables-nft create such rules. Did you consider keeping this bitmask on a per base-chain level? One had to perform this for each base chain of a table upon each rule change and traverse the tree of chains jumped to from there. I guess the huge overhead disqualifies this, though. Cheers, Phil