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 1945D3FB24 for ; Tue, 17 Oct 2023 10:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:237:300::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 438F88E; Tue, 17 Oct 2023 03:09:45 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1qsh19-0007UK-8J; Tue, 17 Oct 2023 12:09:39 +0200 Date: Tue, 17 Oct 2023 12:09:39 +0200 From: Florian Westphal To: Phil Sutter Cc: David Miller , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Florian Westphal , Pablo Neira Ayuso Subject: Re: [net-next PATCH v2] net: skb_find_text: Ignore patterns extending past 'to' Message-ID: <20231017100939.GC10901@breakpoint.cc> References: <20231017093906.26310-1-phil@nwl.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=us-ascii Content-Disposition: inline In-Reply-To: <20231017093906.26310-1-phil@nwl.cc> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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