Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-29 Thread Christoph Hellwig
On Thu, Sep 17, 2020 at 05:15:03AM +0100, Al Viro wrote: > Arrgh... That'd break shmem and similar filesystems... Still, it > feels like we should _not_ bother in cases when there's no ACL > for that sucker; after all, if get_acl() returns NULL, we quietly > return 0 and that's it. > > How about

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-17 Thread Rich Felker
On Thu, Sep 17, 2020 at 05:15:03AM +0100, Al Viro wrote: > On Thu, Sep 17, 2020 at 05:07:15AM +0100, Al Viro wrote: > > On Wed, Sep 16, 2020 at 07:25:53AM +0100, Christoph Hellwig wrote: > > > On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > > > > It was discovered while implementing

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-16 Thread Al Viro
On Thu, Sep 17, 2020 at 05:07:15AM +0100, Al Viro wrote: > On Wed, Sep 16, 2020 at 07:25:53AM +0100, Christoph Hellwig wrote: > > On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > > > It was discovered while implementing userspace emulation of fchmodat > > > AT_SYMLINK_NOFOLLOW (using

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-16 Thread Al Viro
On Wed, Sep 16, 2020 at 07:25:53AM +0100, Christoph Hellwig wrote: > On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > > It was discovered while implementing userspace emulation of fchmodat > > AT_SYMLINK_NOFOLLOW (using O_PATH and procfs magic symlinks; otherwise > > it's not possible

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-16 Thread Rich Felker
On Wed, Sep 16, 2020 at 08:18:15AM +0200, Greg KH wrote: > On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > > It was discovered while implementing userspace emulation of fchmodat > > AT_SYMLINK_NOFOLLOW (using O_PATH and procfs magic symlinks; otherwise > > it's not possible to target

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-16 Thread Rich Felker
On Wed, Sep 16, 2020 at 07:25:53AM +0100, Christoph Hellwig wrote: > On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > > It was discovered while implementing userspace emulation of fchmodat > > AT_SYMLINK_NOFOLLOW (using O_PATH and procfs magic symlinks; otherwise > > it's not possible

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-15 Thread Christoph Hellwig
On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > It was discovered while implementing userspace emulation of fchmodat > AT_SYMLINK_NOFOLLOW (using O_PATH and procfs magic symlinks; otherwise > it's not possible to target symlinks with chmod operations) that some > filesystems erroneou

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-15 Thread Christoph Hellwig
On Wed, Sep 16, 2020 at 08:18:15AM +0200, Greg KH wrote: > On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > > It was discovered while implementing userspace emulation of fchmodat > > AT_SYMLINK_NOFOLLOW (using O_PATH and procfs magic symlinks; otherwise > > it's not possible to target

Re: [PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-15 Thread Greg KH
On Tue, Sep 15, 2020 at 08:22:54PM -0400, Rich Felker wrote: > It was discovered while implementing userspace emulation of fchmodat > AT_SYMLINK_NOFOLLOW (using O_PATH and procfs magic symlinks; otherwise > it's not possible to target symlinks with chmod operations) that some > filesystems erroneou

[PATCH v2 1/2] vfs: block chmod of symlinks

2020-09-15 Thread Rich Felker
It was discovered while implementing userspace emulation of fchmodat AT_SYMLINK_NOFOLLOW (using O_PATH and procfs magic symlinks; otherwise it's not possible to target symlinks with chmod operations) that some filesystems erroneously allow access mode of symlinks to be changed, but return failure w