Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2972528rdb; Tue, 6 Feb 2024 03:31:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEP4AGR6PFvqCZkUeYs3U2LlAhAS/6OCDGiUQ2IMq4m/t7QElNHGQ0C20BgJxCP7AKyUP5p X-Received: by 2002:a17:906:f356:b0:a37:bca9:45d0 with SMTP id hg22-20020a170906f35600b00a37bca945d0mr1227598ejb.72.1707219104675; Tue, 06 Feb 2024 03:31:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707219104; cv=pass; d=google.com; s=arc-20160816; b=Ud1jGl5zLkUBiHTJ16R5vBjE+SfYPKP/7sAXA8Y1rJpHB+MVUFxQzUvkiwi0K4NaBd sxczGfYYPxlspVz9xwHUVrDZctOOQDeoosKyhbDy/bGUs9i8IteaNy9ZegvCxRmeLX03 onVcSObt15G5BGjSAwFZHEeLRf44IKkPmxVs/oUN4K/PU/88u41BcWBjyVQ8DAdCxb2K uaZlGW/RDyYRf2bZv+BfQS6aXYPgiST/pawutypGadkYDgyYxVhXb8u3XMJUvUktSQGP QcVDCuqDUjjCdsznJ3yRaQrJxxRieirDK3oZuBSy9CKmbuKJKoBBLdVGSD7psNPvoiP6 UwRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=zcSMSj/IV86wRj/d3l2TXKJLH+GwbgLgJ5HCBubCyHQ=; fh=iX32r8RhEQ8srJ6HYs2/zB2hcsjMQ0U+l+OREeUFYTE=; b=ZniqGNeZKalF2nYdGgjEqWa4zTeJWziOJAPpH8RSdUYn1ka1Wlmc9dcIWnNIxoZ0S7 nfHmMKj27In+71NVz4KDs791AXHID48FmgwtuhRoFWijlr895f0E3LZ0NzIacVNCmHRj RxVXo3zCjBEcl1phBp91DU9HS0E/HP5CnCN7489hqGtPgFDk0igWutRNfKQzMk4Ye9rL 1JdeYZofCRfthkjaaG/KEGKkP44dKp02AD6N6waTVKxeqa7R2etZUdG134mo2b6hEp02 PQdWkfsXQThQyVF/NVP300Cky1Hg8HADXuffpoSQo+HcTpUNv2ailkZkwUOpPCArSHYW 4YdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=strlen.de); spf=pass (google.com: domain of linux-kernel+bounces-54771-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54771-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVCB976ordYqhQyeMe5t6DnlE8Qm6jqBxxWGDLkzXw1v2FIApTSotlE7F5qkXjsFYV9wtNQqLAktlUQ+lXYznogkW90O78FenK+KlgGfA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p1-20020a170906b20100b00a3740fe794esi1015919ejz.690.2024.02.06.03.31.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 03:31:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54771-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=strlen.de); spf=pass (google.com: domain of linux-kernel+bounces-54771-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54771-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4A5B61F24258 for ; Tue, 6 Feb 2024 11:31:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2550112FF9F; Tue, 6 Feb 2024 11:29:58 +0000 (UTC) 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: linux-kernel@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.