Revision 999653786df6954a31044528ac3f7a5dadca08f4 authored by Ben Hutchings on 22 June 2016, 18:43:35 UTC, committed by J. Bruce Fields on 24 June 2016, 16:11:52 UTC
Use set_posix_acl, which includes proper permission checks, instead of calling ->set_acl directly. Without this anyone may be able to grant themselves permissions to a file by setting the ACL. Lock the inode to make the new checks atomic with respect to set_acl. (Also, nfsd was the only caller of set_acl not locking the inode, so I suspect this may fix other races.) This also simplifies the code, and ensures our ACLs are checked by posix_acl_valid. The permission checks and the inode locking were lost with commit 4ac7249e, which changed nfsd to use the set_acl inode operation directly instead of going through xattr handlers. Reported-by: David Sinquin <david@sinquin.eu> [agreunba@redhat.com: use set_posix_acl] Fixes: 4ac7249e Cc: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
1 parent 485e71e
File | Mode | Size |
---|---|---|
partitions | ||
Kconfig | -rw-r--r-- | 4.2 KB |
Kconfig.iosched | -rw-r--r-- | 1.6 KB |
Makefile | -rw-r--r-- | 922 bytes |
badblocks.c | -rw-r--r-- | 14.1 KB |
bio-integrity.c | -rw-r--r-- | 14.3 KB |
bio.c | -rw-r--r-- | 48.3 KB |
blk-cgroup.c | -rw-r--r-- | 35.8 KB |
blk-core.c | -rw-r--r-- | 94.9 KB |
blk-exec.c | -rw-r--r-- | 3.2 KB |
blk-flush.c | -rw-r--r-- | 15.3 KB |
blk-integrity.c | -rw-r--r-- | 12.3 KB |
blk-ioc.c | -rw-r--r-- | 10.2 KB |
blk-lib.c | -rw-r--r-- | 6.8 KB |
blk-map.c | -rw-r--r-- | 5.6 KB |
blk-merge.c | -rw-r--r-- | 18.6 KB |
blk-mq-cpu.c | -rw-r--r-- | 1.6 KB |
blk-mq-cpumap.c | -rw-r--r-- | 2.6 KB |
blk-mq-sysfs.c | -rw-r--r-- | 11.3 KB |
blk-mq-tag.c | -rw-r--r-- | 17.0 KB |
blk-mq-tag.h | -rw-r--r-- | 2.6 KB |
blk-mq.c | -rw-r--r-- | 56.6 KB |
blk-mq.h | -rw-r--r-- | 3.3 KB |
blk-settings.c | -rw-r--r-- | 27.0 KB |
blk-softirq.c | -rw-r--r-- | 4.4 KB |
blk-sysfs.c | -rw-r--r-- | 18.2 KB |
blk-tag.c | -rw-r--r-- | 10.0 KB |
blk-throttle.c | -rw-r--r-- | 42.6 KB |
blk-timeout.c | -rw-r--r-- | 5.9 KB |
blk.h | -rw-r--r-- | 9.1 KB |
bounce.c | -rw-r--r-- | 5.8 KB |
bsg-lib.c | -rw-r--r-- | 6.0 KB |
bsg.c | -rw-r--r-- | 22.9 KB |
cfq-iosched.c | -rw-r--r-- | 123.9 KB |
cmdline-parser.c | -rw-r--r-- | 4.9 KB |
compat_ioctl.c | -rw-r--r-- | 20.8 KB |
deadline-iosched.c | -rw-r--r-- | 11.2 KB |
elevator.c | -rw-r--r-- | 23.8 KB |
genhd.c | -rw-r--r-- | 45.0 KB |
ioctl.c | -rw-r--r-- | 14.6 KB |
ioprio.c | -rw-r--r-- | 5.1 KB |
noop-iosched.c | -rw-r--r-- | 2.6 KB |
partition-generic.c | -rw-r--r-- | 14.8 KB |
scsi_ioctl.c | -rw-r--r-- | 19.4 KB |
t10-pi.c | -rw-r--r-- | 4.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...