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 <hch@xxxxxx> > > > > 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 <christian.brauner@xxxxxxxxxx> > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > > Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > > Acked-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > > (H)acked-off-by? I suppose we /are/ grafting bits of trees... :D > > Acked-by: Darrick J. Wong <djwong@xxxxxxxxxx> Now queued up, thanks. greg k-h