From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17B5D4174E for ; Tue, 17 Oct 2023 10:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BACE1FA; Tue, 17 Oct 2023 03:43:08 -0700 (PDT) Received: from [78.30.34.192] (port=50662 helo=gnumonks.org) by ganesha.gnumonks.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qshXU-004p5p-Hl; Tue, 17 Oct 2023 12:43:06 +0200 Date: Tue, 17 Oct 2023 12:43:03 +0200 From: Pablo Neira Ayuso To: Florian Westphal Cc: Phil Sutter , David Miller , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org Subject: Re: [net-next PATCH v2] net: skb_find_text: Ignore patterns extending past 'to' Message-ID: References: <20231017093906.26310-1-phil@nwl.cc> <20231017100939.GC10901@breakpoint.cc> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231017100939.GC10901@breakpoint.cc> X-Spam-Score: -1.9 (-) X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Tue, Oct 17, 2023 at 12:09:39PM +0200, Florian Westphal wrote: > Phil Sutter wrote: > > Assume that caller's 'to' offset really represents an upper boundary for > > the pattern search, so patterns extending past this offset are to be > > rejected. > > > > The old behaviour also was kind of inconsistent when it comes to > > fragmentation (or otherwise non-linear skbs): If the pattern started in > > between 'to' and 'from' offsets but extended to the next fragment, it > > was not found if 'to' offset was still within the current fragment. > > > > Test the new behaviour in a kselftest using iptables' string match. > > Reviewed-by: Florian Westphal Reviewed-by: Pablo Neira Ayuso