linux/fs
Miklos Szeredi b030a2c4a4 vfs: canonicalize create mode in build_open_flags()
commit e68726ff72 upstream.

Userspace can pass weird create mode in open(2) that we canonicalize to
"(mode & S_IALLUGO) | S_IFREG" in vfs_create().

The problem is that we use the uncanonicalized mode before calling vfs_create()
with unforseen consequences.

So do the canonicalization early in build_open_flags().

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-14 10:00:05 -07:00
..
9p 9p changes for the 3.4 merge window 2012-03-28 09:58:38 -07:00
adfs
affs
afs
autofs4 autofs: make the autofsv5 packet file descriptor use a packetized pipe 2012-04-29 13:30:08 -07:00
befs
bfs
btrfs Btrfs: call the ordered free operation without any locks held 2012-08-09 08:31:37 -07:00
cachefiles
ceph Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2012-03-28 10:01:29 -07:00
cifs cifs: reinstate sec=ntlmv2 mount option 2012-08-09 08:31:38 -07:00
coda Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
configfs
cramfs
debugfs simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
devpts
dlm dlm fixes for 3.4 2012-04-23 18:22:42 -07:00
ecryptfs eCryptfs: Properly check for O_RDONLY flag before doing privileged open 2012-07-16 09:04:26 -07:00
efs
exofs ore: Fix out-of-bounds access in _ios_obj() 2012-08-15 08:10:09 -07:00
exportfs
ext2 migrate ext2_fs.h guts to fs/ext2/ext2.h 2012-03-31 16:03:16 -04:00
ext3 ext3: move headers to fs/ext3/ 2012-03-31 16:03:16 -04:00
ext4 ext4: fix kernel BUG on large-scale rm -rf commands 2012-08-26 15:00:42 -07:00
fat fat: fix bug in enforcing Long File Name length 2012-03-23 16:58:40 -07:00
freevxfs
fscache
fuse fuse: verify all ioctl retry iov elements 2012-08-26 15:00:39 -07:00
gfs2 GFS2: Instruct DLM to avoid queue convert slowdown 2012-04-24 13:26:50 +01:00
hfs
hfsplus hfsplus: fix bless ioctl when used with hardlinks 2012-06-22 11:36:57 -07:00
hostfs Merge branch 'for-linus-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2012-03-27 18:29:53 -07:00
hpfs
hppfs
hugetlbfs hugetlbfs: lockdep annotate root inode properly 2012-04-25 21:26:34 -07:00
isofs
jbd
jbd2 ext4: make sure the journal sb is written in ext4_clear_journal_err() 2012-08-26 15:00:42 -07:00
jffs2 jffs2: Fix lock acquisition order bug in gc path 2012-05-07 20:30:14 +01:00
jfs
lockd SUNRPC: move per-net operations from svc_destroy() 2012-07-16 09:04:39 -07:00
logfs
minix
ncpfs Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nfs NFS: Fix a number of bugs in the idmapper 2012-08-09 08:31:40 -07:00
nfs_common
nfsd nfsd4: our filesystems are normally case sensitive 2012-08-09 08:31:40 -07:00
nilfs2 nilfs2: fix deadlock issue between chcp and thaw ioctls 2012-08-15 08:10:05 -07:00
nls
notify fs/notify/notification.c: make subsys_initcall function static 2012-03-23 16:58:31 -07:00
ntfs
ocfs2 ocfs2: fix NULL pointer dereference in __ocfs2_change_file_space() 2012-07-16 09:04:45 -07:00
omfs
openpromfs
proc vfs: Fix /proc/<tid>/fdinfo/<fd> file handling 2012-06-10 00:36:18 +09:00
pstore Merge branch 'akpm' (Andrew's patch-bomb) 2012-04-05 15:30:34 -07:00
qnx4
qnx6
quota Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs 2012-03-28 10:00:14 -07:00
ramfs fs: ramfs: file-nommu: add SetPageUptodate() 2012-07-16 09:04:45 -07:00
reiserfs Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
romfs MTD merge for 3.4 2012-03-30 17:31:56 -07:00
squashfs Add an extra mount time sanity check, plus some code cleanups and bug fixes. 2012-03-28 18:05:54 -07:00
sysfs sysfs: handle 'parent deleted before child added' 2012-04-10 14:48:51 -07:00
sysv
ubifs UBIFS: fix a bug in empty space fix-up 2012-07-29 08:04:20 -07:00
udf udf: Improve table length check to avoid possible overflow 2012-08-09 08:31:36 -07:00
ufs Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
xfs Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
aio.c vfs: make AIO use the proper rw_verify_area() area helpers 2012-06-01 15:18:14 +08:00
anon_inodes.c
attr.c vfs: increment iversion when a file is truncated 2012-06-10 00:36:12 +09:00
bad_inode.c
binfmt_aout.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_elf_fdpic.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_elf.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_em86.c
binfmt_flat.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
binfmt_misc.c magic.h: move some FS magic numbers into magic.h 2012-03-23 16:58:31 -07:00
binfmt_script.c
binfmt_som.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
bio-integrity.c
bio.c bio allocation failure due to bio_get_nr_vecs() 2012-05-11 16:45:12 +02:00
block_dev.c block: don't mark buffers beyond end of disk as mapped 2012-05-11 16:42:14 +02:00
buffer.c block: fix infinite loop in __getblk_slow 2012-07-19 08:58:55 -07:00
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
compat.c vfs: missed source of ->f_pos races 2012-09-14 10:00:05 -07:00
dcache.c vfs: make word-at-a-time accesses handle a non-existing page 2012-05-03 14:01:40 -07:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c epoll: clear the tfile_check_list on -ELOOP 2012-04-25 21:26:33 -07:00
exec.c posix_types.h: Cleanup stale __NFDBITS and related definitions 2012-08-09 08:31:39 -07:00
fcntl.c
fhandle.c
fifo.c fifo: Do not restart open() if it already found a partner 2012-07-19 08:58:56 -07:00
file_table.c
file.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
filesystems.c
fs_struct.c The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
fs-writeback.c trivial writeback fixes 2012-03-28 10:07:27 -07:00
generic_acl.c
inode.c
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c dentry leak in simple_fill_super() failure exit 2012-04-09 01:39:22 -04:00
locks.c locks: fix checking of fcntl_setlease argument 2012-08-09 08:31:29 -07:00
Makefile
mbcache.c
mount.h
mpage.c
namei.c vfs: make word-at-a-time accesses handle a non-existing page 2012-05-03 14:01:40 -07:00
namespace.c vfs: umount_tree() might be called on subtree that had never made it 2012-06-10 00:36:12 +09:00
no-block.c
open.c vfs: canonicalize create mode in build_open_flags() 2012-09-14 10:00:05 -07:00
pipe.c pipes: add a "packetized pipe" mode for writing 2012-04-29 13:12:42 -07:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
read_write.h
readdir.c
select.c posix_types.h: Cleanup stale __NFDBITS and related definitions 2012-08-09 08:31:39 -07:00
seq_file.c The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
signalfd.c
splice.c splice: fix racy pipe->buffers uses 2012-07-16 09:04:42 -07:00
stack.c
stat.c The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
statfs.c
super.c The following text was taken from the original review request: 2012-03-24 10:24:31 -07:00
sync.c
timerfd.c
utimes.c
xattr_acl.c
xattr.c fs/xattr.c:setxattr(): improve handling of allocation failures 2012-04-05 15:25:50 -07:00