From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (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 6997112B152; Tue, 6 Feb 2024 11:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707218997; cv=none; b=pOYv0m4VHFi65DAM7AYR/wiBrFK1bsqmBGdr/lRudnhXABcumRD0wLbGZTj3A7v3ph1OYrxx71Rziy2ZaLto95SbE8Pdnay032cqAFrzINOZYHmL3IfLFf4PqO8ysgsrk3vubzj36xAqOGDG9z2SZp5wSPz4T9aUAn3/wY4oebs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707218997; c=relaxed/simple; bh=d8j5bVacOldPx0qHulCU26piuVSsiWVjLgm8BB62cJE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gyh/648J0nYbkQhQicgcoPkrrYzgwiZ2uozGcx8ef2MtBshLWDWgmgzB2Sz8LchDTlXvhU0eMCpV8yBQ2+rSSYMGAeGtcr6KfaawODTXQdZV0sHQ0u4zpdJLtoyVvO34VH4gpPIdSU+ZGB9cisC4+tAPCZshbUGTs4Sb8LplahA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1rXJM8-0001Ub-Do; Tue, 06 Feb 2024 12:11:12 +0100 Date: Tue, 6 Feb 2024 12:11:12 +0100 From: Florian Westphal To: Michal Kubecek Cc: Dan Carpenter , Florian Westphal , Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, andrea.mattiazzo@suse.com Subject: Re: [PATCH net] netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval() Message-ID: <20240206111112.GD17626@breakpoint.cc> References: <15fdceb5-2de5-4453-98b3-cfa9d486e8da@moroto.mountain> <20240206104336.ctigqpkunom2ufmn@lion.mk-sys.cz> 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: <20240206104336.ctigqpkunom2ufmn@lion.mk-sys.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Michal Kubecek wrote: > I stumbled upon this when the issue got a CVE id (sigh) and I share > Andrea's (Cc-ed) concern that the fix is incomplete. While the fix, > commit c301f0981fdd ("netfilter: nf_tables: fix pointer math issue in > nft_byteorder_eval()") now, fixes the destination side, src is still > a pointer to u32, i.e. we are reading 64-bit values with relative > offsets which are multiples of 32 bits. > > Shouldn't we fix this as well, e.g. like indicated below? No, please remove multi-elem support instead, nothing uses this feature.