linux-stable/fs/fuse
Miklos Szeredi a09f99edde fuse: fix killing s[ug]id in setattr
Fuse allowed VFS to set mode in setattr in order to clear suid/sgid on
chown and truncate, and (since writeback_cache) write.  The problem with
this is that it'll potentially restore a stale mode.

The poper fix would be to let the filesystems do the suid/sgid clearing on
the relevant operations.  Possibly some are already doing it but there's no
way we can detect this.

So fix this by refreshing and recalculating the mode.  Do this only if
ATTR_KILL_S[UG]ID is set to not destroy performance for writes.  This is
still racy but the size of the window is reduced.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org>
2016-10-01 07:32:32 +02:00
..
control.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
cuse.c fuse: Add reference counting for fuse_io_priv 2016-03-14 15:02:51 +01:00
dev.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse 2016-07-29 12:29:15 -07:00
dir.c fuse: fix killing s[ug]id in setattr 2016-10-01 07:32:32 +02:00
file.c fuse: direct-io: don't dirty ITER_BVEC pages 2016-08-24 18:17:04 +02:00
fuse_i.h fuse: Use generic xattr ops 2016-10-01 07:32:32 +02:00
inode.c fuse: Use generic xattr ops 2016-10-01 07:32:32 +02:00
Kconfig fuse: Move CUSE Kconfig entry from fs/Kconfig into fs/fuse/Kconfig 2013-01-17 13:08:45 +01:00
Makefile fuse: Use generic xattr ops 2016-10-01 07:32:32 +02:00
xattr.c fuse: Use generic xattr ops 2016-10-01 07:32:32 +02:00