Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2098825lqe; Tue, 9 Apr 2024 09:26:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUul9wygLyk21KJe813f5VSIw8nlgs3SRM4+qzeRWQ8rEblUM8jaCL4wphyPy2/aAWSQkNUHLKG/vgUJ8tAHBoAwOwIs7Bq0jZV7rnFqQ== X-Google-Smtp-Source: AGHT+IFTeBBu5+5nfNxRiOxHvboP2ESv0uURNRKWm6IVINvpqLuEpeed3uTHN/N0C2jUgNnCofpn X-Received: by 2002:a05:6214:e8a:b0:69b:2fb3:d16a with SMTP id hf10-20020a0562140e8a00b0069b2fb3d16amr50626qvb.33.1712679995181; Tue, 09 Apr 2024 09:26:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712679995; cv=pass; d=google.com; s=arc-20160816; b=xCPXzRFncZ2jJpZDvRNCjnB13jwakbEODWwlMOoFlFMmFQemNe9cNGnGJS8uKiY1Iz hJ6rDi94Nf8F3O1BF74lkXDrKg6Y4aYXodEdQEIkeKQd/TsTLcp5GWVgLIDWwq1n74co gJP9UqElLLmchGE/+vw74ke/mrTjYp70YrgDswf8b3a6Jm1+V8SiCaA4EXtZADjwOHTj YaR3P8tONDMd3I3bbz2WmqoHYHn9F5G8xVgxU/4VGlGV099qu/ssnUwsCMSyze4qOVnt W2gXjDwhUzdzCIyPtFvQOSoUeNDH16Qjep2vXnJhWsqkmG4NN1brCpuDUnXMEsZx5XYp tTcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=ty4BwWZvIxrkPVChPVI3LUwWVMwSnCumX0TJmcBbQqg=; fh=guIiWHVjE0iZxftlV0c+uJ0Gcjhl9rhcN47RI/i+jxA=; b=BT+TKR8go0jOLLrb0HI24P5Wft2N+qm08ESFH1nip+mZonRPqoTUKqsQR91k+muFkt uAlcQwD0lsLJS0K8jvRdnahR5g3wijRycuHCaG5sq/W4f5c06uo+xNaBV5ApWgLDMO9D Nw90tNN7Yn0sdQFsSJDDzMk2WcBGMTOIrpYvDmUpHFlMS8HIq7QYB6AzSplRSbo+FEFD hCwW4XlJZUlYOsOOrzXqsgQKXDxvzcY+JGpDNfBKNryALYB1HLe5NgMKYKCdpsdJ+VPd hrXeCW3A0FbkFf7ujDGBHPv/9TY3gu+PkVn/ZrAObVPcmfNvFeHuEleAefgE2ULaIMGh FXOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@omnibond-com.20230601.gappssmtp.com header.s=20230601 header.b=D1eoL9sd; arc=pass (i=1 spf=pass spfdomain=omnibond.com dkim=pass dkdomain=omnibond-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-137317-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137317-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i12-20020a0cfccc000000b0069b1f8b4d91si3724373qvq.108.2024.04.09.09.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 09:26:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137317-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@omnibond-com.20230601.gappssmtp.com header.s=20230601 header.b=D1eoL9sd; arc=pass (i=1 spf=pass spfdomain=omnibond.com dkim=pass dkdomain=omnibond-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-137317-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137317-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E341D1C21A63 for ; Tue, 9 Apr 2024 16:26:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34BAE13E3F4; Tue, 9 Apr 2024 16:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=omnibond-com.20230601.gappssmtp.com header.i=@omnibond-com.20230601.gappssmtp.com header.b="D1eoL9sd" Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (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 DB0CD13E05D for ; Tue, 9 Apr 2024 16:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712679986; cv=none; b=Rni/c5uJYZlWI8/UYs111/W8wsjDUuI02eLmsxcTGsPctWB3+t7n51vn1n7/vvi3bWi7pz2WplSY+CRAOys3XTdm4vlONhntG6ahmiep3kAI3HvJamlvojdwKqDIdgYUpuLzAGH3LiwzptqoAuNLzdkxvLcrPP7LhTNWkzgtLo4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712679986; c=relaxed/simple; bh=ulQ6PWJvV5PaX5ZxY16FXaf8ZFkz5DuHJFEVcGtM+6s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=btyOaPgNu3Kvx9X+rKFR0CI2EJ6tUuN5BK+mnkvS0M1+VavmWQHe2v2pTCYRHG5ZYG8iZSlxqf+jcrfTN8INkp9QNpht1bRUi6pV46cBjSJ1x1K6Pyj0tx3JYYquE31cuaoD9UBUNqZmLqdKzcsRH6Cu0O8re8L9/JtBE9gUVyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omnibond.com; spf=pass smtp.mailfrom=omnibond.com; dkim=pass (2048-bit key) header.d=omnibond-com.20230601.gappssmtp.com header.i=@omnibond-com.20230601.gappssmtp.com header.b=D1eoL9sd; arc=none smtp.client-ip=209.85.167.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omnibond.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=omnibond.com Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3c60019eecaso333775b6e.0 for ; Tue, 09 Apr 2024 09:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=omnibond-com.20230601.gappssmtp.com; s=20230601; t=1712679984; x=1713284784; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ty4BwWZvIxrkPVChPVI3LUwWVMwSnCumX0TJmcBbQqg=; b=D1eoL9sdbeCTTjuhoNLiRU28jbKKmRo+QJYJkTXgwQ28QKzKPNZh1+XYvqaby9A8Nv V1274Yu9opf77LLKZ/SuEFBDZ0rpmvHNxih6x2h8Vx7exTZFjRtAnByIpTE9IM6XK/yU m1Q3VdvhIQfYoY5bf85H/fYu5fhK6DuohFD98t9HMtK+oTbXZLLVbOdm/NreJg/Vd31j wuTaJtLJhZNQ3vDk4UDSDT53RE6Sx4w30KGRq3KjwB8EkHh1MkM0W2qiLXp+iROHQxtZ SbFpmynw2bbxYU+D9nHhtBgu99F1ooao5S2D/4zTcFsxYsZH4DSt3WZEfkY+v+g/sR8t 2hYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712679984; x=1713284784; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ty4BwWZvIxrkPVChPVI3LUwWVMwSnCumX0TJmcBbQqg=; b=WVEPrdyVjxXTGqYP844HiJS4PGr1shqqJVe7EY9BI69rVZqWWOk1Xqqc2zHXjXKIVs oqkImDGt14Kj5GKc9zNYh6TYLAiyKI34fXNfSg9AZeBuwQxX3jcaGrhJB2/52kjmto25 MWI0jWJFdYbueBNKRw/rBS8qOhDw4S+EW3k9z/npqzgGaOpQmC7i+9XODL0vytEmIeZb 5Jmo4LrcBMAqRgo5vo7Bb6WQVUbLr5uHkWx2eMn0xIxbvd904ZRPyX6eFp4HY0zGpwrx K8SoDS+3VC2eOuL6ao4eBzrdJOLbE0B2+bdBGT12ij8zOqQlz+bv0IvbjSWnWPcsY2HQ ZX3w== X-Forwarded-Encrypted: i=1; AJvYcCXiolyCHrYyzlkfIRO4TBaQDlrug7ljC3Yficy69jiBqmaKLoxdp074bDnpd0o6go9UZUYPvNz2r4XfvlTWrl4NUD1HxsG3RYRNPUBT X-Gm-Message-State: AOJu0YxN5xgCIXoWsntfg+azz0jzdo0Wx1PV9WAzVnSeKghIZBFM0coE uOcU3saoIyBlhCof+UaSi4+vWfB/p8WkSoG+vZtjpL902CId4uZrAyCLldd/oXIwtl5Ib1fI119 xsTttZQVVCUGkC/zMjer14bfEvFyDETUQbAkyuXKfnDm5TwG69g== X-Received: by 2002:a05:6808:1a:b0:3c5:f51e:a0a1 with SMTP id u26-20020a056808001a00b003c5f51ea0a1mr6217029oic.51.1712679984020; Tue, 09 Apr 2024 09:26:24 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240408075052.3304511-1-arnd@kernel.org> <20240408143623.t4uj4dbewl4hyoar@quack3> <96b55a64-2bcf-44da-a728-ae54e2a73343@app.fastmail.com> In-Reply-To: <96b55a64-2bcf-44da-a728-ae54e2a73343@app.fastmail.com> From: Mike Marshall Date: Tue, 9 Apr 2024 12:26:12 -0400 Message-ID: Subject: Re: [PATCH] [RESEND] orangefs: fix out-of-bounds fsid access To: Arnd Bergmann Cc: Justin Stitt , Jan Kara , Arnd Bergmann , linux-fsdevel@vger.kernel.org, Alexander Viro , Christian Brauner , Martin Brandenburg , devel@lists.orangefs.org, Vlastimil Babka , Kees Cook , linux-kernel@vger.kernel.org, Mike Marshall Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I applied Arnd's patch on top of Linux 6.9-rc3 and ran through xfstests with no issue. Also, instead of Arnd's patch, I used Jan's idea: + + buf->f_fsid.val[0] =3D ORANGEFS_SB(sb)->fs_id; + buf->f_fsid.val[1] =3D ORANGEFS_SB(sb)->id; + And ran that through as well, no issue. Sorry for missing the earlier patch. -Mike On Tue, Apr 9, 2024 at 1:55=E2=80=AFAM Arnd Bergmann wrote: > > On Mon, Apr 8, 2024, at 23:21, Justin Stitt wrote: > > On Mon, Apr 8, 2024 at 7:36=E2=80=AFAM Jan Kara wrote: > >> Frankly, this initializer is hard to understand for me. Why not simple= : > >> > >> buf->f_fsid[0] =3D ORANGEFS_SB(sb)->fs_id; > >> buf->f_fsid[1] =3D ORANGEFS_SB(sb)->id; > >> > > > > +1 for this idea, seems easier to read for me. > > Yes, good idea, I'll send this as v2 after my next round > of build testing. > > Arnd