From patchwork Mon Nov 11 00:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13870100 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60D6AD12D5C for ; Mon, 11 Nov 2024 00:53:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5759E6B007B; Sun, 10 Nov 2024 19:53:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 524D96B0082; Sun, 10 Nov 2024 19:53:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3EC026B0083; Sun, 10 Nov 2024 19:53:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 22AA96B007B for ; Sun, 10 Nov 2024 19:53:06 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C64CF16036A for ; Mon, 11 Nov 2024 00:53:05 +0000 (UTC) X-FDA: 82771989006.05.5A4C965 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf06.hostedemail.com (Postfix) with ESMTP id EC21C180004 for ; Mon, 11 Nov 2024 00:52:35 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Mhwow0Ij; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf06.hostedemail.com: domain of cel@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=cel@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731286298; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=8sjI8h8GdPb2w1QxsZ86juFDQGt/6W7QQa/uurNrc2Y=; b=q4+3qZHhxzlFavOBelAutKTYOFnVELVVoYQWkBp7DYqtCQYoah2BPtX9OdVMNgtElhv+An oqyjiXkvwVodDxe9B/pSI26EldtwxvDc0SJ/pGt71TydEy7/yCvt4beKJxYwdAcoTZaBcB XJ1nQstQ5N+s/K5wTcWPeginrcY5QuA= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Mhwow0Ij; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf06.hostedemail.com: domain of cel@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=cel@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731286298; a=rsa-sha256; cv=none; b=CU/vDMzEJQ5mmy/b4BlUBC/P7C+HISiumO4pRZ0YO1prfLNhKDlQeQ9D/Alkz2PsIugOpn ABMGr2Du5DpMDgkAU27qpibyB6Vi4FO9nL1plmGn9vxa/Zg1NhYo8oGqwsXtpSGHB/UDGJ f/1BLZB578BraoxNC+UTuBtxFEoyEHA= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E62E1A4136A; Mon, 11 Nov 2024 00:51:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20823C4CECD; Mon, 11 Nov 2024 00:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731286382; bh=C7U10fwANKiFBMRI52JouNQIj2KlR6BzvPBPUClWPD8=; h=From:To:Cc:Subject:Date:From; b=Mhwow0Ij212yflZSULWSomZb5GiK6f/567/Rs9y8BH80zSCwtq8/JiesbTlKioDV5 dN3UWOmmhGAyzlNviW3r5IZur7x0p26gKwTOaYsXGa6W14FKWbFRDKZk+nQLqdhvvP fjtf58j9qlQTmZ/q8xMI00zmbe2w4ygw7eC6iZCkzG1BW/IWPTyJhAsPlmJpLnbwFA vSKY52joO0rnRa+/oXCQ28XF6ajIdH6uiDynOq1XEH4UvB/oXFGprojnAk1OuQM8L6 Ms18C5x6dpX3aENekQwApc+LJqmvr2kjCneGrBKsmJyln0JHrryBExKzk7Mjfqb9gC g8sqf8Il1YFpw== From: cel@kernel.org To: Cc: yukuai1@huaweicloud.com, harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, viro@zeniv.linux.org.uk, brauner@kernel.org, Liam.Howlett@oracle.com, akpm@linux-foundation.org, hughd@google.com, willy@infradead.org, gregkh@linuxfoundation.org, sashal@kernel.org, srinivasan.shanmugam@amd.com, chiahsuan.chung@amd.com, mingo@kernel.org, mgorman@techsingularity.net, yukuai3@huawei.com, chengming.zhou@linux.dev, zhangpeng.00@bytedance.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, , linux-fsdevel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, yi.zhang@huawei.com, yangerkun@huawei.com, Chuck Lever Subject: [RFC PATCH 0/6 6.6] Address rename/readdir bugs in fs/libfs.c Date: Sun, 10 Nov 2024 19:52:36 -0500 Message-ID: <20241111005242.34654-1-cel@kernel.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EC21C180004 X-Stat-Signature: cumz9jt5adm9ix8k6a37otn6ubqqxggq X-HE-Tag: 1731286355-460390 X-HE-Meta: U2FsdGVkX1/iSo2E7E6LrVej0UBdOq1DNnuVIHqOAxFZXLhwYMJ243s4DlemmZyKcW1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ODvM3sqwo1aZyV3/xZiqtTOsf11ZLbp5CILowSjTRHnhEGmxVAKTYp68EsQDiLkDXBci4iVoJ/STufZ0ieINX6oCxDx4aNdVZtGgl X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Chuck Lever Address several bugs in v6.6's libfs/shmemfs, including CVE-2024-46701. Link: https://lore.kernel.org/stable/976C0DD5-4337-4C7D-92C6-A38C2EC335A4@oracle.com/T/#me685f54ac17ea1e39265dd5f1bb1f173c557a564 I'm still running the usual set of regression tests, but so far this set looks stable. I'm interested in hearing review comments and test results. Branch for testing: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git/log/?h=nfsd-6.6.y Chuck Lever (5): libfs: Define a minimum directory offset libfs: Add simple_offset_empty() libfs: Fix simple_offset_rename_exchange() libfs: Add simple_offset_rename() API shmem: Fix shmem_rename2() yangerkun (1): libfs: fix infinite directory reads for offset dir fs/libfs.c | 135 +++++++++++++++++++++++++++++++++++++-------- include/linux/fs.h | 3 + mm/shmem.c | 7 +-- 3 files changed, 119 insertions(+), 26 deletions(-)