[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250509-deckung-glitschig-8d27cb12f09f@brauner>
Date: Fri, 9 May 2025 12:33:00 +0200
From: Christian Brauner <brauner@...nel.org>
To: David Howells <dhowells@...hat.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Etienne Champetier <champetier.etienne@...il.com>, Marc Dionne <marc.dionne@...istor.com>,
Jeffrey Altman <jaltman@...istor.com>, Chet Ramey <chet.ramey@...e.edu>,
Steve French <sfrench@...ba.org>, linux-afs@...ts.infradead.org, openafs-devel@...nafs.org,
linux-cifs@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] afs, bash: Fix open(O_CREAT) on an extant AFS file in a
sticky dir
On Tue, May 06, 2025 at 11:26:30AM +0100, David Howells wrote:
> Christian Brauner <brauner@...nel.org> wrote:
>
> > > However, the bash work around is going to be removed:
> >
> > Why is it removed? That's a very strange comment:
>
> Because it makes bash output redirection work differently to other programs, I
> would guess. It's actually a simple security check to work around (just retry
> the open() with O_CREAT dropped) - however, it does expose an... error, I
> suppose, in the Linux kernel: namely that the VFS itself is treating foreign
> files as if they had local system ownership.
>
> We have the ->permission() inode op for this reason (I presume) - but that
> only applies to certain checks. The VFS must not assume that it can interpret
> i_uid and i_gid on an inode and must not assume that it can compare them to
> current->fsuid and current->fs_gid.
>
> Now, in my patch, I added two inode ops because they VFS code involved makes
> two distinct evaluations and so I made an op for each and, as such, those
> evaluations may be applicable elsewhere, but I could make a combined op that
> handles that specific situation instead.
Try to make it one, please.
Powered by blists - more mailing lists