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 1335A2F38 for ; Wed, 5 Jul 2023 22:56:54 +0000 (UTC) Received: from mail.netfilter.org (mail.netfilter.org [217.70.188.207]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D220CF7; Wed, 5 Jul 2023 15:56:53 -0700 (PDT) Date: Thu, 6 Jul 2023 00:56:50 +0200 From: Pablo Neira Ayuso To: Thadeu Lima de Souza Cascardo Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, Florian Westphal Subject: Re: [PATCH v2] netfilter: nf_tables: prevent OOB access in nft_byteorder_eval Message-ID: References: <20230705201232.GG3751@breakpoint.cc> <20230705210535.943194-1-cascardo@canonical.com> 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: <20230705210535.943194-1-cascardo@canonical.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 On Wed, Jul 05, 2023 at 06:05:35PM -0300, Thadeu Lima de Souza Cascardo wrote: > When evaluating byteorder expressions with size 2, a union with 32-bit and > 16-bit members is used. Since the 16-bit members are aligned to 32-bit, > the array accesses will be out-of-bounds. Applied to nf, thanks