alistair23-linux/fs/ext4
Ernesto A. Fernández 397e434176 ext4: preserve i_mode if __ext4_set_acl() fails
When changing a file's acl mask, __ext4_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.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
2017-07-30 22:43:41 -04:00
..
acl.c ext4: preserve i_mode if __ext4_set_acl() fails 2017-07-30 22:43:41 -04:00
acl.h
balloc.c
bitmap.c
block_validity.c
dir.c
ext4.h ext4: remove unused metadata accounting variables 2017-07-30 22:30:11 -04:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h ext4: improve journal credit handling in set xattr paths 2017-06-21 22:28:40 -04:00
extents.c ext4: call journal revoke when freeing ea_inode blocks 2017-06-21 21:36:51 -04:00
extents_status.c scripts/spelling.txt: add "comsume(r)" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
extents_status.h
file.c The first major feature for ext4 this merge window is the largedir 2017-07-09 09:31:22 -07:00
fsmap.c ext4: fix off-by-one fsmap error on 1k block filesystems 2017-06-23 00:58:57 -04:00
fsmap.h ext4: support GETFSMAP ioctls 2017-04-30 00:36:53 -04:00
fsync.c ext4: use errseq_t based error handling for reporting data writeback errors 2017-07-06 07:02:30 -04:00
hash.c
ialloc.c ext4: fix __ext4_new_inode() journal credits calculation 2017-07-06 00:01:59 -04:00
indirect.c ext4: call journal revoke when freeing ea_inode blocks 2017-06-21 21:36:51 -04:00
inline.c ext4: xattr-in-inode support 2017-06-21 21:10:32 -04:00
inode.c ext4: correct comment references to ext4_ext_direct_IO() 2017-07-30 22:26:40 -04:00
ioctl.c quota: add get_inode_usage callback to transfer multi-inode charges 2017-06-22 11:46:48 -04:00
Kconfig
Makefile ext4: support GETFSMAP ioctls 2017-04-30 00:36:53 -04:00
mballoc.c ext4: fix spelling mistake: "prellocated" -> "preallocated" 2017-07-06 15:28:45 -04:00
mballoc.h ext4: send parallel discards on commit completions 2017-06-22 23:54:33 -04:00
migrate.c ext4: do not set posix acls on xattr inodes 2017-06-21 21:21:39 -04:00
mmp.c
move_extent.c ext4: add ext4_is_quota_file() 2017-06-22 11:31:25 -04:00
namei.c ext4: return EFSBADCRC if a bad checksum error is found in ext4_find_entry() 2017-06-23 00:47:05 -04:00
page-io.c ext4: add support for passing in write hints for buffered writes 2017-06-27 12:05:44 -06:00
readpage.c block: switch bios to blk_status_t 2017-06-09 09:27:32 -06:00
resize.c
super.c ext4: remove unused metadata accounting variables 2017-07-30 22:30:11 -04:00
symlink.c ext4: Add statx support 2017-04-03 01:05:58 -04:00
sysfs.c ext4: check return value of kstrtoull correctly in reserved_clusters_store 2017-06-23 01:08:22 -04:00
truncate.h
xattr.c ext4: fix __ext4_new_inode() journal credits calculation 2017-07-06 00:01:59 -04:00
xattr.h ext4: fix __ext4_new_inode() journal credits calculation 2017-07-06 00:01:59 -04:00
xattr_security.c
xattr_trusted.c
xattr_user.c