linux-uconsole/security
Jeff Vander Stoep 3841b3185d selinux: do not check open perm on ftruncate call
Use the ATTR_FILE attribute to distinguish between truncate()
and ftruncate() system calls. The two other cases where
do_truncate is called with a filp (and therefore ATTR_FILE is set)
are for coredump files and for open(O_TRUNC). In both of those cases
the open permission has already been checked during file open and
therefore does not need to be repeated.

Commit 95dbf73931 ("SELinux: check OPEN on truncate calls")
fixed a major issue where domains were allowed to truncate files
without the open permission. However, it introduced a new bug where
a domain with the write permission can no longer ftruncate files
without the open permission, even when they receive an already open
file.

(cherry picked from commit b21800f304392ee5d20f411c37470183cc779f11)

Bug: 22567870
Change-Id: Id7c305e46beba5091c2c777529bd468216aae1c3

Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
(cherry picked from commit df46bc83c1fc9b64b2e86290935a3ad550b2e56e)
2015-10-27 16:47:05 +08:00
..
apparmor sched: move no_new_privs into new atomic flags 2014-10-07 16:42:32 -07:00
integrity evm: check xattr value length and type in evm_inode_setxattr() 2014-11-14 08:47:54 -08:00
keys KEYS: close race between key lookup and freeing 2015-01-29 17:40:56 -08:00
optee_linuxdriver OP-TEE: build optee_linuxdriver into kernel 2015-10-22 12:13:58 +08:00
selinux selinux: do not check open perm on ftruncate call 2015-10-27 16:47:05 +08:00
smack Smack: include magic.h in smackfs.c 2013-04-03 13:13:51 +11:00
tlk_driver TrustZone: Add TrustZone Driver 2015-01-07 17:49:49 +08:00
tomoyo Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
yama yama: Better permission check for ptraceme 2013-03-26 13:17:58 -07:00
capability.c Add security hooks to binder and implement the hooks for SELinux. 2015-01-13 22:48:51 +00:00
commoncap.c Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-09-18 10:49:35 -07:00
device_cgroup.c devcg: remove parent_cgroup. 2013-04-18 11:34:35 -07:00
inode.c securityfs: fix object creation races 2012-01-10 10:20:35 -05:00
Kconfig OP-TEE: build optee_linuxdriver into kernel 2015-10-22 12:13:58 +08:00
lsm_audit.c security: lsm_audit: add ioctl specific auditing 2015-04-13 19:55:16 +00:00
Makefile OP-TEE: build optee_linuxdriver into kernel 2015-10-22 12:13:58 +08:00
min_addr.c
security.c Add security hooks to binder and implement the hooks for SELinux. 2015-01-13 22:48:51 +00:00