From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA473C32771 for ; Sat, 24 Sep 2022 09:37:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233642AbiIXJhH (ORCPT ); Sat, 24 Sep 2022 05:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233646AbiIXJhH (ORCPT ); Sat, 24 Sep 2022 05:37:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B18822502; Sat, 24 Sep 2022 02:37:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 58E2AB80DAB; Sat, 24 Sep 2022 09:37:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A209EC433D6; Sat, 24 Sep 2022 09:37:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664012224; bh=rww4KG8UuqfwOfyBLEiOuHilfH1HZYFAdHqdoJd/16k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sDgFPTLbMgY8lmK7s3vzA23D7X0KoJKO0B5mF3V73bjLq6RV1IQfBU/b3huRX7YT0 aceYZDM265lr40yeOmnQMIlRqd/OzzCExgEV1dz7Ar2pAjLJV6ADS2XEus2MMWpDaS PdRpQZ7bIQopM91TNkskgIbVsWO9ocYltuZdnims= Date: Sat, 24 Sep 2022 11:37:01 +0200 From: Greg Kroah-Hartman To: "Darrick J. Wong" Cc: Amir Goldstein , Sasha Levin , Leah Rumancik , Chandan Babu R , Varsha Teratipally , Christian Brauner , Christoph Hellwig , linux-xfs@vger.kernel.org, stable@vger.kernel.org, Christian Brauner Subject: Re: [PATCH 5.10] xfs: fix up non-directory creation in SGID directories Message-ID: References: <20220922084956.74262-1-amir73il@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Sep 22, 2022 at 08:21:29AM -0700, Darrick J. Wong wrote: > On Thu, Sep 22, 2022 at 11:49:56AM +0300, Amir Goldstein wrote: > > From: Christoph Hellwig > > > > commit 01ea173e103edd5ec41acec65b9261b87e123fc2 upstream. > > > > XFS always inherits the SGID bit if it is set on the parent inode, while > > the generic inode_init_owner does not do this in a few cases where it can > > create a possible security problem, see commit 0fa3ecd87848 > > ("Fix up non-directory creation in SGID directories") for details. > > > > Switch XFS to use the generic helper for the normal path to fix this, > > just keeping the simple field inheritance open coded for the case of the > > non-sgid case with the bsdgrpid mount option. > > > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > > Reported-by: Christian Brauner > > Signed-off-by: Christoph Hellwig > > Reviewed-by: Darrick J. Wong > > Signed-off-by: Darrick J. Wong > > Signed-off-by: Amir Goldstein > > Acked-off-by: Darrick J. Wong > > (H)acked-off-by? I suppose we /are/ grafting bits of trees... :D > > Acked-by: Darrick J. Wong Now queued up, thanks. greg k-h