From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 38C2B1DFE00; Fri, 21 Feb 2025 15:24:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740151481; cv=none; b=kXaZ+BU0g1khFQ36c/2jsixKOIHt6h+dafD9bVKVC1dOVq+H1u733v0+BQ3q1azCw+iRbPKZW+lOBEHBpUMhGJSaqxRW5ytVHFXc4o7LqFaTM6pcgrfJvqRM8/Nc8b/P0fL4C29rejLuQd/nq2HOSJvmPH55NnD1sBjllSrXUkY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740151481; c=relaxed/simple; bh=W5Di/UD2iK9qunRjz9YNJewUZgoN1gblE0HC+RJgSf0=; h=Subject:To:Cc:From:Date:In-Reply-To:Message-ID:MIME-Version: Content-Type; b=LcdTkxC0KgVfbRv361FZzbCXekLHZhA55HCXWlavZY3YGZdfmPijvAWWCOV7VyDCmq3+rC38sIHvtSC+29KVkbkpet0u1d8v2jSug8bLIilNFFiwZZvurjhavaUSesXC7bsvBpDjKPyJnTBc8nV3WTZBGPDkMcFPdbr2YC6SvSI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Jn26J11G; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Jn26J11G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3ACFC4CED6; Fri, 21 Feb 2025 15:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740151481; bh=W5Di/UD2iK9qunRjz9YNJewUZgoN1gblE0HC+RJgSf0=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=Jn26J11GQWTDF3orIeweDYGZFDIBiKp45z708e88MOO66yWX4kwFFnqTVY0Kk+sxc S9vYr2ybvPzqp1MVQmE2uUkCWnWVEPb7VXM37Z0GWXZKK9I9+bupf6JNUNoYBcD7++ LyReztynlwsuGzsVTd+K7x2h6yblHZg11KiYRBQI= Subject: Patch "xfs: validate inumber in xfs_iget" has been added to the 6.6-stable tree To: catherine.hoang@oracle.com,dchinner@redhat.com,djwong@kernel.org,gregkh@linuxfoundation.org,hch@lst.de,xfs-stable@lists.linux.dev Cc: From: Date: Fri, 21 Feb 2025 16:23:29 +0100 In-Reply-To: <20250205214025.72516-3-catherine.hoang@oracle.com> Message-ID: <2025022129-tightrope-sedate-4a8c@gregkh> Precedence: bulk X-Mailing-List: xfs-stable@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore This is a note to let you know that I've just added the patch titled xfs: validate inumber in xfs_iget to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: xfs-validate-inumber-in-xfs_iget.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From stable+bounces-113968-greg=kroah.com@vger.kernel.org Wed Feb 5 22:40:46 2025 From: Catherine Hoang Date: Wed, 5 Feb 2025 13:40:03 -0800 Subject: xfs: validate inumber in xfs_iget To: stable@vger.kernel.org Cc: xfs-stable@lists.linux.dev Message-ID: <20250205214025.72516-3-catherine.hoang@oracle.com> From: "Darrick J. Wong" commit 05aba1953f4a6e2b48e13c610e8a4545ba4ef509 upstream. Actually use the inumber validator to check the argument passed in here. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Catherine Hoang Acked-by: Darrick J. Wong Signed-off-by: Greg Kroah-Hartman --- fs/xfs/xfs_icache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -748,7 +748,7 @@ xfs_iget( ASSERT((lock_flags & (XFS_IOLOCK_EXCL | XFS_IOLOCK_SHARED)) == 0); /* reject inode numbers outside existing AGs */ - if (!ino || XFS_INO_TO_AGNO(mp, ino) >= mp->m_sb.sb_agcount) + if (!xfs_verify_ino(mp, ino)) return -EINVAL; XFS_STATS_INC(mp, xs_ig_attempts); Patches currently in stable-queue which might be from catherine.hoang@oracle.com are queue-6.6/xfs-return-bool-from-xfs_attr3_leaf_add.patch queue-6.6/xfs-fix-a-sloppy-memory-handling-bug-in-xfs_iroot_realloc.patch queue-6.6/xfs-streamline-xfs_filestream_pick_ag.patch queue-6.6/xfs-merge-xfs_attr_leaf_try_add-into-xfs_attr_leaf_addname.patch queue-6.6/xfs-don-t-free-cowblocks-from-under-dirty-pagecache-on-unshare.patch queue-6.6/xfs-pass-the-exact-range-to-initialize-to-xfs_initialize_perag.patch queue-6.6/xfs-assert-a-valid-limit-in-xfs_rtfind_forw.patch queue-6.6/xfs-don-t-use-__gfp_retry_mayfail-in-xfs_initialize_perag.patch queue-6.6/xfs-use-try_cmpxchg-in-xlog_cil_insert_pcp_aggregate.patch queue-6.6/xfs-don-t-ifdef-around-the-exact-minlen-allocations.patch queue-6.6/xfs-reduce-unnecessary-searches-when-searching-for-the-best-extents.patch queue-6.6/xfs-validate-inumber-in-xfs_iget.patch queue-6.6/xfs-support-lowmode-allocations-in-xfs_bmap_exact_minlen_extent_alloc.patch queue-6.6/xfs-skip-background-cowblock-trims-on-inodes-open-for-write.patch queue-6.6/xfs-remove-empty-declartion-in-header-file.patch queue-6.6/xfs-fold-xfs_bmap_alloc_userdata-into-xfs_bmapi_allocate.patch queue-6.6/xfs-update-the-file-system-geometry-after-recoverying-superblock-buffers.patch queue-6.6/xfs-call-xfs_bmap_exact_minlen_extent_alloc-from-xfs_bmap_btalloc.patch queue-6.6/xfs-distinguish-extra-split-from-real-enospc-from-xfs_attr_node_try_addname.patch queue-6.6/xfs-error-out-when-a-superblock-buffer-update-reduces-the-agcount.patch queue-6.6/xfs-update-the-pag-for-the-last-ag-at-recovery-time.patch queue-6.6/xfs-check-for-delayed-allocations-before-setting-extsize.patch queue-6.6/xfs-fix-a-typo.patch queue-6.6/xfs-distinguish-extra-split-from-real-enospc-from-xfs_attr3_leaf_split.patch