linux/fs/ext3
Ben Hutchings ff8c7374e5 ext3: preserve i_mode if ext2_set_acl() fails
Based on Ernesto A. Fernández's fix for ext2 (commit fe26569eb9), from
which the following description is taken:

> When changing a file's acl mask, ext2_set_acl() will first set the group
> bits of i_mode to the value of the mask, and only then set the actual
> extended attribute representing the new acl.
>
> If the second part fails (due to lack of space, for example) and the file
> had no acl attribute to begin with, the system will from now on assume
> that the mask permission bits are actual group permission bits, potentially
> granting access to the wrong users.
>
> Prevent this by only changing the inode mode after the acl has been set.

Cc: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-10-12 15:28:07 +01:00
..
acl.c ext3: preserve i_mode if ext2_set_acl() fails 2017-10-12 15:28:07 +01:00
acl.h ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
balloc.c ext3: remove an unneeded check in ext3_new_blocks() 2014-03-03 11:31:01 +01:00
bitmap.c ext3: use memweight() 2012-07-30 17:25:16 -07:00
dir.c fs: Mark function as static in ext3/dir.c 2014-03-03 11:30:59 +01:00
ext3.h Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-05-25 08:14:59 -07:00
ext3_jbd.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
file.c ->splice_write() via ->write_iter() 2014-06-12 00:18:51 -04:00
fsync.c ext3: Fix fsync error handling after filesystem abort. 2013-07-04 19:22:55 +02:00
hash.c ext3: return 32/64-bit dir name hash according to usage type 2012-05-15 23:34:39 +02:00
ialloc.c ext2/3: use prandom_u32() instead of get_random_bytes() 2014-03-04 12:19:03 +01:00
inode.c fs: Give dentry to inode_change_ok() instead of inode 2017-02-23 03:53:52 +00:00
ioctl.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
Kconfig ext3: default to ordered mode 2010-07-23 12:50:55 +02:00
Makefile [PATCH] ext3: uninline large functions 2006-12-07 08:39:35 -08:00
namei.c ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
namei.h ext3: ext3_bread usage audit 2012-10-09 23:21:42 +02:00
resize.c Ext3: return ENOMEM rather than EIO if sb_getblk fails 2013-01-21 11:19:57 +01:00
super.c ext3: Don't check quota format when there are no quota files 2014-11-13 11:48:34 +00:00
symlink.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr.c ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
xattr.h ext2/3/4: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
xattr_security.c fs: Mark function as static in ext3/xattr_security.c 2014-03-03 11:31:00 +01:00
xattr_trusted.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
xattr_user.c ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00