Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2959673rdb; Tue, 6 Feb 2024 03:04:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOqavwfpbd5aEeVWvVDP2AflICsQpqzY4SOA3k4WiJluUyjkr+THeSR8iGyJUs+txCFmjx X-Received: by 2002:a17:907:7719:b0:a38:3f60:4f4c with SMTP id kw25-20020a170907771900b00a383f604f4cmr335199ejc.63.1707217487808; Tue, 06 Feb 2024 03:04:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707217487; cv=pass; d=google.com; s=arc-20160816; b=WFvH9VwyyMWIVn/Q43SGwjSB4pWuzdVW9/Sh8MjzM8zAgSh0tMS7FeEILg7lJgWCEq 4VhVoJfYabf03orgLzk3DmN4/Qnj/gVTXtp87tGHoWCLTOXt0i3aWcedXLwP0nvO91Gt DVS81wZ/+gZhCJ3nid7I1z+t/jDx0Rbx/h3056zuHxykR/gQLN5urO53ioph+uTQU9HB 4FIQijP0jf0Gjt708w2AHeIoOXGQh416+Iianj7d21CUtevB67AtReV4qJ0NLIJD3NjD cw+x0aTUM7Ci/mi1W8pwQwVhs7+CwnYZzX83uewZPK4+T+w+wTwvx4lO3dsIbs9IK8iJ RP0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=txJ4UfEaHG02zODZo80UumZhELeKYRvUYcjtXa7HnRM=; fh=u71c7yHvvqt/jBUGggA+wMWdYUL6HpuQH9WFzE/xyu0=; b=yb1phEEpnGcWMcJJVOtTiQ5BszfhNGU4zM4qfSddGmrGyV5yG/inXw0fBcZfKYztPX 7Kc8GvOecm9oAAH4iFdgGIGKwh4uGQe6i642QBX7uQVnZGDYXergTKN48rqBAMfwByif KEQ3Y2YBXm5EM83F1N8fdDCLqTuNXX4dj3t4X3sexCdocYJaneYSwABB52fnJDEcIedb y9quwdFtkF+AW8tIWEYZ2W0ENXydkVN9b/Rur24s2XhE8Z2I4UhKkutj937pDWxPQMr2 qd2rwgrp/inkEJdrdjVKdfCP/sH6xYaNcn++V6LPSjYdfmO+zGX3tWT0g2NwpfroVms9 2UHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hVWQbIC7; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-54733-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCXtPCvkxnGtmQrAfSXBkGv7+ZaeEeaQ6jbWp9R2nxDi59osjJ82JroFRZoSi6Nct7elLdG/Lsyh55C2vXMJiNB3eReFS3uncLvbGA7XZQ== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a22-20020a17090640d600b00a3756e1992dsi959101ejk.1041.2024.02.06.03.04.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 03:04:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54733-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hVWQbIC7; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-54733-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54733-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 EE5131F247C9 for ; Tue, 6 Feb 2024 11:04:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5C9712EBC3; Tue, 6 Feb 2024 11:04:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hVWQbIC7" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B7B312F386 for ; Tue, 6 Feb 2024 11:04:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707217458; cv=none; b=dkIorouEtNI66HZnvt7Aen7zHuezocG9RRsK0+hYllqfmjSARpOXelL8KSyISNz1wXcdlV6FUb0q6Wi4J6ZP5bcCjfePhSR2JpfSLT2adm/xVMYbWyPlj0Y8CsULe+TOVbkjxiN9yDhryYGdgakRcQuUAZiFib3EjqmI9o4eMmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707217458; c=relaxed/simple; bh=x0pbIQk1qP8nN3+ZGiA3qhVlXb3liKdO9iZ/xJXSuMM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Cbl2vmfIzD60fTrTrB3UDss1aE+1TWF9tJ9Qn/tY8z79noeMDFJJsTu0nqkY4F6GUbIn8EgcCatTsr/Qr7yfYBywxr8461czbAAMStIMx6Nbjk2rXTBkPGO6y+2utoQMJ3lSp3xkUyZG45mmOoFPIigUW9onQxjUPIpDrHyRgk4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hVWQbIC7; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a37721e42feso322789866b.2 for ; Tue, 06 Feb 2024 03:04:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707217454; x=1707822254; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=txJ4UfEaHG02zODZo80UumZhELeKYRvUYcjtXa7HnRM=; b=hVWQbIC7T6puE1VFjp9sEN9nnaS886cp5T1KAHNeQJHGHe10dnd+9YiVHbNDvjD/jE E0BxVBiwfpvkzuo2rTCOucLSL8/oCg3gOJ1wiZzBSuj63ElAOj3HiHjHNeYbi1r10nLy N4jhCjp2ZPt5MkWnMTGOo5NrZXqNqnbC8nRYz1Bhu24xyKaOwrXF/vLLUX5hhilICiCQ z84DBWNEnbsM/gNFEFjgGqemqslP2++gQYEng6ahu8YAm8hmSLcssqsGbc1nlopV+4Kq Mn6nm3sgaP4Q367S43cRxs1pO4a8Z7SqoKtMsVxKwMXA2iEcPyPzIX0EXcpvz0QrtBOk iV8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707217454; x=1707822254; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=txJ4UfEaHG02zODZo80UumZhELeKYRvUYcjtXa7HnRM=; b=qXY+v36GzK2cmB9dlG/gN9fLT68+vyEV6ZfTcPDZTWquetQlaLRyBXXLuEFT2bhtrf EDl+M5DrbUjQp5OxwfH/QuQnIa5r1o8EBQNK+O2X0udfTZB0wUsEOdpLI45+ItmmtXkb OQeWaN5I14nQ8NYfoYh6ESwug4UmbAYkoohyqb7Ijt71Uymj8zHytqPPjG3mabZJ7o7U PF41TmH1eDXUlg0G9Dn/KEDgKdkFJNQ2wAF+oQc5IPGlxdR6vsTsSm3gMwnopLUS1Uw+ qKDxz2N7uLV1VR5WkSGkJ/oFZcO9um5HtCOkUmnN7D2U6SyMpuvvG1zYI4eb456ZJWxr JZwA== X-Gm-Message-State: AOJu0YwD2ddnX7aGNJ76VVy2a9b0lLO9lmkrSJ3pyEiUZhI4Xf/x0tOA ez/caE9BEpRo/QCHROTrAE7XsEPKv+39M6dxIEJdwMST5Klkbjk3xuo5Vf6QeiI= X-Received: by 2002:a17:906:5ac8:b0:a36:917f:556e with SMTP id x8-20020a1709065ac800b00a36917f556emr1519178ejs.15.1707217454596; Tue, 06 Feb 2024 03:04:14 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW+eTU1hVRe+dDWI0m3fgkor2XU3vpZXvDha5qQUKJtKz8d5lIw/sHS4Gxbk+qMN2jP9BT4hjHyGqC0lbjHI36V9FSBhKhURsIkoNoxKSYHcN9JYIhD+V6W+EMs9Ot60yde0RsBOWaG0V/Ol27awVPUWuCgmkXQxSPZvTWjomcxSOePUkKetQ6t1L85qdFge5egX4yjR2Gb4rpBt0YAHyTtTVbUbiQwHuXRjwo6j4tXAEQdkcOAvIZItmn6+NE3FCBGfJyQ9nn9F1TXRLTKXECQeQZoT4NH1jPMCv+ARxnqs5cDhCYwgemV1uS5RSlaojgEjHT1Tqq78HeLk7sshVIfaYgHFzkGdv8kngGvICfXAlsQiEUUXlNQV4QHdWwf7mUIg7TtSDkHeQh16qF8UNCGTu7BZXmUqIxzoObLMXLWd+Q+aXoEckx7KK4Xdxa4u9B5tm+c+83qkWA8s0ZkQTHQad5OOxt9QCY6+UKf Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id vb7-20020a170907d04700b00a354bb5f69csm998982ejc.220.2024.02.06.03.04.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 03:04:14 -0800 (PST) Date: Tue, 6 Feb 2024 14:04:10 +0300 From: Dan Carpenter To: Michal Kubecek Cc: 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: <032e2c72-c2a1-4b8b-96da-b0da73473648@moroto.mountain> 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> On Tue, Feb 06, 2024 at 11:43:36AM +0100, 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? > Yep. You're right. Could you send that as a patch. regards, dan carpenter